GIT – Notes

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 BRANCH2

>git push BRANCH2


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



git clone

git fetch

git checkout branch1


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”.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s