Created
June 7, 2011 05:43
-
-
Save tecoholic/1011749 to your computer and use it in GitHub Desktop.
Creating Patches in GIT
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
#To visualize branches: | |
git branch | |
#To create a new branch: | |
git branch testbranch | |
#To change to created branch: | |
git checkout testbranch | |
#Track new files: | |
git add . | |
#or | |
git add * | |
#To make a commit: | |
git commit -am 'commit message' | |
#To delete a branch (you need be in other branch to do that): | |
git branch -D testbranch | |
#To remove the last commit: | |
git reset --hard HEAD | |
#Create patches between two branches: | |
git format-patch master..testbranch | |
#Create Patch without branching | |
git format-patch HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment