User Tools

Site Tools


git-tutorial

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
git-tutorial [2012/12/29 23:35] smilauergit-tutorial [2012/12/29 23:43] smilauer
Line 131: Line 131:
 Note: when a repository is cloned, git automatically creates a master branch that tracks origin/master branch, but there is no automatic update (need to use "pull" command) Note: when a repository is cloned, git automatically creates a master branch that tracks origin/master branch, but there is no automatic update (need to use "pull" command)
  
-If you already have oofem.git directory from a previous time, you can update your branch. ''fetch'' does not touch your working branch. +If you already have oofem.git directory from a previous time, you can update ''master'' branch.
  
-   $ git fetch origin  //update master +   (git diff master origin/master)  //see the differences between local and remote masters 
-   $ git checkout featureA //change to branch you want to change, or stay in local master +   $ git checkout master 
-   $ git merge origin/master //merge with a remote master+   $ git pull --rebase
  
 Normally, we do not want to modify ''master'' branch directly. For this reason, we create a new brach ''featureA'' for our development, which is a copy from an active previous branch ''master'' Normally, we do not want to modify ''master'' branch directly. For this reason, we create a new brach ''featureA'' for our development, which is a copy from an active previous branch ''master''
git-tutorial.txt · Last modified: 2017/11/01 09:08 by bp