From 1aa0352af74106657ddd23fc6365fb5efe66e464 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 6 May 2016 15:11:28 +0200 Subject: Add note on colorizing branch in git status --- cheatsheet.txt | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/cheatsheet.txt b/cheatsheet.txt index 72727dc..0f38214 100644 --- a/cheatsheet.txt +++ b/cheatsheet.txt @@ -1,3 +1,9 @@ +Global Setup + + See also Submodules below. + + git config --global color.status.branch red + Tag git tag -a x.y.z -m "Tag version x.y.z" @@ -21,7 +27,7 @@ Copy commit from one branch to the other # On the source branch git log -1 git cout - git cherry-pick + git cherry-pick Setup remote repository @@ -67,9 +73,9 @@ Delete a branch from a remote repository Rebasing Local (e.g., from a feature branch to master): - + git rebase [] - + If is not specified, current branch is used. If is specified, it is checked out. @@ -128,7 +134,7 @@ History Cleanup didn't record the resolutions. And in this case what you would have gotten is a normal merge conflict, just like the first time, that you have to resolve manually again. - + Running 'git stat' should give you the idea of what needs fixing. Once you have edit the files, run 'git add' and then 'git rebase --continue'. @@ -161,7 +167,7 @@ History Cleanup and count the number of commits from the top to the first commit that is on master (and if you know a better way to achieve the same result, let me know). That is your . - + Note also that the order of commits in the resulting edit file will be the reverse of what you see in gitk. @@ -181,7 +187,7 @@ History Cleanup Verify with gitk everything looks good on master and push: git push - + It is also a good idea to delete the feature branch, both locally and on the origin: @@ -211,7 +217,7 @@ Submodules git submodule update --remote [sub] # update submodule(s) (to remote master) # --rebase - + git fetch git checkout # As above but to specific commit. -- cgit v1.1