Difference between revisions of "Git"
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
* git commit | * git commit | ||
* git push origin set-default-options:set-default-options | * git push origin set-default-options:set-default-options | ||
− | = | + | =Overwriting updates to a branch= |
* git add <edited file> | * git add <edited file> | ||
* git commit --ammend | * git commit --ammend | ||
* git push origin +set-default-options:set-default-options | * git push origin +set-default-options:set-default-options | ||
+ | |||
=Merging= | =Merging= | ||
* git rev-parse HEAD | * git rev-parse HEAD |
Revision as of 07:55, 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 http.proxy proxy.traderonline.com:80; service puppet start
- cd /etc/puppet; git submodule init; git submodule update
Creating a new Branch
- on dssysdev02
- git clone --bare http://git.ops.traderonline.com/centos-netinstall-dws.git /path/to/centos-netinstall-dws.git
- cd /path/to/centos-netinstall-dws.git
- git remote rm origin
- cd /path/to/centos-netinstall-dws.git; git update-server-info; mv hooks/post-update.sample hooks/post-update
- on laptop
- git clone ssh://root@git.dhsint.com/path/to/centos-netinstall-dws.git
- git checkout -b set-default-options
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
Merging
- git rev-parse HEAD
- git merge-base HEAD tol/sendmail
- git merge --no-ff tol/sendmail
- git push origin master:master