Showing posts with label change branch. Show all posts
Showing posts with label change branch. Show all posts

Tuesday, March 1, 2016

Git Process Commands


To change from one branch to other brach

git checkout -b  
ex:  git checkout -b 3.3 



To Undo the last commit or stash the last commit
git stash    -- Do the merge, and than pull the stash:
git stash pop --get the commited files to current branch


Reset the last commit in local
To discard the local changes using
sy: git reset --hard



To change the Last commit message in git



git commit --amend

will open your editor, allowing you to change the commit message of the most recent commit. Additionally, you can set the commit message directly in the command line with:

git commit --amend -m "New commit message"



To get the patch to file (all changes to specified file)


Git diff > sample.txt