From ddf3dd98db9d59c807be8f68498d3c28fbce6110 Mon Sep 17 00:00:00 2001 From: teyhouse Date: Sun, 14 Jul 2024 11:15:34 +0200 Subject: [PATCH 1/4] Add Branches to Git cheatsheet --- src/tools/git-memo/git-memo.content.md | 23 ++++++++++++++++++++++- src/tools/git-memo/index.ts | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/tools/git-memo/git-memo.content.md b/src/tools/git-memo/git-memo.content.md index 6783ad86..01cb68cc 100644 --- a/src/tools/git-memo/git-memo.content.md +++ b/src/tools/git-memo/git-memo.content.md @@ -1,3 +1,4 @@ + ## Configuration Set the global config @@ -35,6 +36,26 @@ Add new modifications to the last commit git commit --amend --no-edit ``` +## Branches + +Lists all local branches in your repository (use -a for remote local and remote branches): + +```shell +git branch +``` + +Switch to an existing branch: + +```shell +git switch [branch name] +``` + +Create a new branch: + +```shell +git checkout -b [branch name] +``` + ## I’ve made a mistake Change last commit message @@ -74,4 +95,4 @@ Renaming the local master branch to main ```shell git branch -m master main -``` +``` \ No newline at end of file diff --git a/src/tools/git-memo/index.ts b/src/tools/git-memo/index.ts index f65ffe07..5dcae4e6 100644 --- a/src/tools/git-memo/index.ts +++ b/src/tools/git-memo/index.ts @@ -6,7 +6,7 @@ export const tool = defineTool({ name: translate('tools.git-memo.title'), path: '/git-memo', description: translate('tools.git-memo.description'), - keywords: ['git', 'push', 'force', 'pull', 'commit', 'amend', 'rebase', 'merge', 'reset', 'soft', 'hard', 'lease'], + keywords: ['git', 'push', 'force', 'pull', 'commit', 'branch', 'switch', 'checkout', 'amend', 'rebase', 'merge', 'reset', 'soft', 'hard', 'lease'], component: () => import('./git-memo.vue'), icon: BrandGit, }); From cb74514c30d49df6dc94e5d0bd189564b32aede0 Mon Sep 17 00:00:00 2001 From: teyhouse Date: Sun, 14 Jul 2024 11:17:51 +0200 Subject: [PATCH 2/4] fix space --- src/tools/git-memo/git-memo.content.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tools/git-memo/git-memo.content.md b/src/tools/git-memo/git-memo.content.md index 01cb68cc..02b4ecfe 100644 --- a/src/tools/git-memo/git-memo.content.md +++ b/src/tools/git-memo/git-memo.content.md @@ -1,4 +1,3 @@ - ## Configuration Set the global config From 23702258caf1bb64c74dc889e18228752f4b24fd Mon Sep 17 00:00:00 2001 From: Tobias Date: Sun, 14 Jul 2024 11:28:13 +0200 Subject: [PATCH 3/4] Update git-memo.content.md: Fix Typo --- src/tools/git-memo/git-memo.content.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/git-memo/git-memo.content.md b/src/tools/git-memo/git-memo.content.md index 02b4ecfe..fd21e958 100644 --- a/src/tools/git-memo/git-memo.content.md +++ b/src/tools/git-memo/git-memo.content.md @@ -37,7 +37,7 @@ git commit --amend --no-edit ## Branches -Lists all local branches in your repository (use -a for remote local and remote branches): +Lists all local branches in your repository (use -a for local and remote branches): ```shell git branch @@ -94,4 +94,4 @@ Renaming the local master branch to main ```shell git branch -m master main -``` \ No newline at end of file +``` From bdc2889ddbf84e96d4ce431e31306596ec423ee4 Mon Sep 17 00:00:00 2001 From: Tobias Date: Sun, 14 Jul 2024 11:31:25 +0200 Subject: [PATCH 4/4] Update git-memo.content.md: remove : --- src/tools/git-memo/git-memo.content.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/git-memo/git-memo.content.md b/src/tools/git-memo/git-memo.content.md index fd21e958..b2830ef7 100644 --- a/src/tools/git-memo/git-memo.content.md +++ b/src/tools/git-memo/git-memo.content.md @@ -37,19 +37,19 @@ git commit --amend --no-edit ## Branches -Lists all local branches in your repository (use -a for local and remote branches): +Lists all local branches in your repository (use -a for local and remote branches) ```shell git branch ``` -Switch to an existing branch: +Switch to an existing branch ```shell git switch [branch name] ``` -Create a new branch: +Create a new branch ```shell git checkout -b [branch name]