Difference between revisions of "Git"

From DarkWiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
===Cherry picking===
 
===Cherry picking===
  
If you need to merge in a single commit into your current branch, you can make use of <code>git cherry-pick</code>.
+
If you need to merge in a single commit into your current branch, you can make use of <code>git cherry-pick</code>. For example, if you wish to merge in commit "1237645187234781fqcfewfe", you need only issue the following command:
  
 
  git cherry-pick 1237645187234781fqcfewfe
 
  git cherry-pick 1237645187234781fqcfewfe
 +
 +
If you are needing to merge in a commit from a remote branch, you will need to ensure you've fetched the tags.
 +
 +
git fetch

Latest revision as of 07:52, 9 May 2018

Cherry picking

If you need to merge in a single commit into your current branch, you can make use of git cherry-pick. For example, if you wish to merge in commit "1237645187234781fqcfewfe", you need only issue the following command:

git cherry-pick 1237645187234781fqcfewfe

If you are needing to merge in a commit from a remote branch, you will need to ensure you've fetched the tags.

git fetch