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
Last revisionBoth sides next revision
git:git_cheatsheet [2015/01/25 17:11] devagit:git_cheatsheet [2015/04/10 10:43] – [Delete branch] deva
Line 85: Line 85:
 </code> </code>
  
 +====Create branch====
 +Create and switch to:
 +<code>
 +git checkout -b [branchname]
 +</code>
 +
 +Just create:
 +<code>
 +git branch [branchname]
 +</code>
 +
 +Push to server:
 +<code>
 +git push -u origin [branchname]
 +</code>
 ====Switch to branch==== ====Switch to branch====
 <code> <code>
Line 90: Line 105:
 </code> </code>
  
 +====Delete branch====
 +<code>
 +git branch -d branchname
 +git push origin --delete branchname
 +</code>
  
 +====Fecth branches from server====
 +<code>
 +git fetch --all
 +</code>
 =====CVS 2 GIT===== =====CVS 2 GIT=====
 <code> <code>
git/git_cheatsheet.txt · Last modified: 2017/02/21 20:20 by deva