User Tools

Site Tools


git:git_cheatsheet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
git:git_cheatsheet [2013/12/13 11:18] devagit:git_cheatsheet [2015/02/24 17:50] deva
Line 83: Line 83:
 <code> <code>
 git branch git branch
 +</code>
 +
 +====Create branch====
 +Create and switch to:
 +<code>
 +git checkout -b [branchname]
 +</code>
 +
 +Just create:
 +<code>
 +git branch [branchname]
 </code> </code>
  
Line 90: Line 101:
 </code> </code>
  
 +====Delete branch====
 +<code>
 +git branch -d branchname
 +git push origin --delete branchname
 +</code>
  
 =====CVS 2 GIT===== =====CVS 2 GIT=====
Line 117: Line 133:
 </code> </code>
 NOTE: If this is done by the usual 'git push' command, a 'No refs in common and none specified; doing nothing.' error will be issued. NOTE: If this is done by the usual 'git push' command, a 'No refs in common and none specified; doing nothing.' error will be issued.
 +
 +=====Move single directory to its own repository=====
 +http://stackoverflow.com/questions/359424/detach-subdirectory-into-separate-git-repository/17864475#17864475
 +
 +=====Replace email address in commits and tags======
 +https://help.github.com/articles/changing-author-info/
 +
 +NOTE: The way the push command is performed is important in order to overwrite bot commits and tags.
git/git_cheatsheet.txt · Last modified: 2017/02/21 20:20 by deva