Difference between revisions of "Git notes"

From Simson Garfinkel
Jump to navigation Jump to search
(Created page with "Setting up an intermediate repository: On the intermediate host: $ git clone --mirror git@remote://repo-name To pull from remote server: $ssh intermediate-host 'c...")
 
m
 
Line 12: Line 12:
  
 
     $ git pull mirror; git push mirror
 
     $ git pull mirror; git push mirror
 +
 +
Fun:
 +
  $ git log --online --decorate
 +
  $ git log --graph --all
 +
 +
Use git fetch rather than git pull:
 +
 +
  get fetch origin
 +
  git diff origin
 +
  git checkout -b serverfix origin/serverfix

Latest revision as of 06:22, 3 November 2019

Setting up an intermediate repository:

On the intermediate host:

   $ git clone --mirror git@remote://repo-name

To pull from remote server:

   $ssh  intermediate-host 'cd mirror.git;git fetch origin;git push origin'

To sync to local one:

   $ git pull mirror; git push mirror

Fun:

  $ git log --online --decorate
  $ git log --graph --all

Use git fetch rather than git pull:

  get fetch origin
  git diff origin
  git checkout -b serverfix origin/serverfix