Created
March 14, 2014 12:29
-
-
Save drmalex07/9546789 to your computer and use it in GitHub Desktop.
Provide a simple workflow for a git rebase scenario. #git #git-rebase #scm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a branch named "feature-a" | |
git branch feature-a | |
# Switch to branch "feature-a" updating your working copy | |
git checkout feature-a | |
# Work ... | |
vim hello.py | |
vim README | |
# Meanwhile new changes have been applied to master | |
# rebase our branch to master | |
git rebase master | |
# Switch to "master" beanch | |
git checkout master | |
git merge feature-a | |
# View diffs | |
git difftool --tool=meld | |
# Resolve conflicts, if any | |
git mergetool --tool=meld | |
# Push branch (same name) to a remote repo | |
git push -u origin feature-a | |
# Delete branch | |
git branch -D feature-a | |
# Delete remote branch | |
git push origin --delete feature-a | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
email = foo@example.com | |
name = foo | |
[merge] | |
tool = meld | |
[alias] | |
logg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
logg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
logg = !"git logg1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment