User Tools

Site Tools


info:code:git

Differences

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

Link to this comparison view

Next revision
Previous revision
info:code:git [2016-08-12 10:37]
andunix created
info:code:git [2018-12-06 11:07] (current)
andunix
Line 3: Line 3:
 === Init Repository === === Init Repository ===
 Standard: Standard:
-  git init (DIR)+  git init [DIR]
 Bare: Bare:
-  git init --bare (DIR)+  git init --bare [DIR
 +=== Log === 
 +See commits between branches: 
 +  git log master..develop
 ===== Branches ===== ===== Branches =====
 === List Branches === === List Branches ===
   git branch   git branch
 === Switch Branch === === Switch Branch ===
-  git checkout -BRANCH +  git checkout BRANCH 
- +=== Delete Branch === 
- +  git branch -BRANCH 
 +=== Delete Remote Branch === 
 +  git push origin -d BRANCH 
 +=== List unmerges branches === 
 +List branches with commits, which are not in branch REF: 
 +  git branch --no-merged REF 
 +For example, list unmerged branches, which are not in ''develop'': 
 +  git branch --no-merged develop 
 +=== List unmerges commits === 
 +List commits in branch BRANCH, which are not in branch REF: 
 +  git cherry -v REF BRANCH 
 +For example, list commits in a feature branch, which are not in ''develop'': 
 +  git cherry -v develop feature/FEATURE 
 +===== Subversion ===== 
 +=== Update === 
 +  git svn fetch 
 +====== Git Flow ====== 
 +=== Init === 
 +  git flow init 
 +=== Feature === 
 +  git flow feature start FEATURE 
 +  git flow feature finish FEATURE 
 +=== Release === 
 +  git flow release start RELEASE [BASE]  
 +  git flow release finish RELEASE 
 +=== Hotfix === 
 +  git flow hotfix start VERSION [BASENAME] 
 +  git flow hotfix finish VERSION 
 +===== Diff ===== 
 +If you only want the changes files between branches, you can user this:
  
 +  git diff --name-status branchA..branchB
  
info/code/git.1470991023.txt.gz · Last modified: 2016-08-12 10:37 by andunix