Difference between revisions of "Git"

From KeegansWiki
Jump to navigation Jump to search
Line 1: Line 1:
 
=New Clone=
 
=New Clone=
* service puppet stop; service puppetmaster stop; rm -fr /etc/puppet; http_proxy=proxy.traderonline.com:80 git clone http://git.dhsint.com/puppetconf-tol.git /etc/puppet; cd /etc/puppet; git config http.proxy proxy.traderonline.com:80; service puppet start
+
* service puppet stop; service puppetmaster stop; rm -fr /etc/puppet; http_proxy=proxy.traderonline.com:80 git clone http://git.dhsint.com/puppetconf-tol.git /etc/puppet; cd /etc/puppet; git config --global http.proxy proxy.traderonline.com:80; service puppet start
 
* cd /etc/puppet; git submodule init; git submodule update
 
* cd /etc/puppet; git submodule init; git submodule update
 +
 
=Creating a new Branch=
 
=Creating a new Branch=
 
* on dssysdev02
 
* on dssysdev02

Revision as of 08:11, 11 August 2011

New Clone

  • service puppet stop; service puppetmaster stop; rm -fr /etc/puppet; http_proxy=proxy.traderonline.com:80 git clone http://git.dhsint.com/puppetconf-tol.git /etc/puppet; cd /etc/puppet; git config --global http.proxy proxy.traderonline.com:80; service puppet start
  • cd /etc/puppet; git submodule init; git submodule update

Creating a new Branch

Pushing new branch after edits

  • git add <edited file>
  • git commit
  • git push origin set-default-options:set-default-options

Overwriting updates to a branch

  • git add <edited file>
  • git commit --ammend
  • git push origin +set-default-options:set-default-options

Merge My Edits

  • git checkout master
  • git merge --no-ff set-default-options
  • git push origin master:master

Once that is complete, delete the branch

  • git push origin :set-default-options
  • git branch -d set-default-options

Merging Someone Else's Edits

  • git rev-parse HEAD
  • git merge-base HEAD tol/<branch>
  • git merge --no-ff tol/<branch>
  • git push origin master:master