GIT – Notes

http://ndpsoftware.com/git-cheatsheet.html
http://git-scm.com/docs
http://git-scm.com/

How to do Cherry Pick?

JIRA: ABC-12345

Source: BRANCH1
Target: BRANCH2

>git checkout BRANCH1

>git pull –rebase

>git checkout BRANCH2

(ab1234c is Parent Number)
>git cherry-pick ab1234c

>git diff ..origin/BRANCH2

>git push –dry-run https://USERID@bitbucket.org/ORG_NAME/project.git BRANCH2

>git push https://USERID@bitbucket.org/ORG_NAME/project.git BRANCH2

-o-

How to commit/push code?

>git status
>git add file names (with path given above on demand basis )
>git commit -m “JIRA Number and Subject”
>git push

-o-

————————————————————————–

git clone https://bitbucket.org/abcd.com/branch/branch1

git fetch

git checkout branch1

————————————————————————–

https://confluence.atlassian.com/display/BITBUCKET/Clone+Your+Git+Repo+and+Add+Source+Files

git reset –hard origin/master

git pull –rebase
When you have resolved this problem, run “git rebase –continue”.
If you prefer to skip this patch, run “git rebase –skip” instead.
To check out the original branch and stop rebasing, run “git rebase –abort”.

————————————————————————–

Reference: http://gitref.org/basic/

Advertisements