Difference between revisions of "GIT Commands"

From SIMA wiki
Jump to: navigation, search
(Created page with "__NOTOC__ File:Git_workflow.PNG If you change a file the changes are saved in the workspace ===add=== adds a changed file to the index ===commit=== commits all files fro...")
 
(commit)
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
 
adds a changed file to the index
 
adds a changed file to the index
 
===commit===
 
===commit===
commits all files from the index to the selected branch of the local repository. If the option -1 is set all changes from the workspace were committed to the local repository
+
commits all files from the index to the selected branch of the local repository. If the option -a is set all changes from the workspace were committed to the local repository
 +
 
 
===push===
 
===push===
 
pushes the local representation of the remote branches into the remote repository
 
pushes the local representation of the remote branches into the remote repository
Line 14: Line 15:
 
===merge===
 
===merge===
 
merges one branch into another
 
merges one branch into another
===pulL===calls the function fetch and merges the local branch into the corresponding (local representation) remote branch
+
===pull===
 +
calls the function fetch and merges the local branch into the corresponding (local representation) remote branch

Latest revision as of 11:54, 17 January 2013

Git workflow.PNG

If you change a file the changes are saved in the workspace

add

adds a changed file to the index

commit

commits all files from the index to the selected branch of the local repository. If the option -a is set all changes from the workspace were committed to the local repository

push

pushes the local representation of the remote branches into the remote repository

fetch

downloads objects and references from the remote repository. The local branches are not merged with the corresponding local representation of the remote branches! (see Branches)

merge

merges one branch into another

pull

calls the function fetch and merges the local branch into the corresponding (local representation) remote branch