2014年1月6日 星期一

[git] Git Reference

[git] Git Reference

01 http://gitref.org/
02 http://git-scm.com/book/zh-tw/Git-%E5%9F%BA%E7%A4%8E-%E8%88%87%E9%81%A0%E7%AB%AF%E5%8D%94%E5%90%8C%E5%B7%A5%E4%BD%9C


[git] Git Shell lost shortcut

1. Running the Git Shell via the command line (Since you lost the shortcut)
  • C:\Users\Username\AppData\Local\GitHub\GitHub.appref-ms --open-shell
2. Once youre in the Git Shell run the command in the previous answer
  • github --reinstall-shortcuts
You'll find the Git Shell with the grey cat icon that originally came with the GitHub setup in the desktop.

Ref :
http://stackoverflow.com/questions/17457182/how-to-install-git-shell


[git] Git Clone
git clone --mirror https://github-url/source.git
cd source.git
git push --mirror https://github-url/target.git


[git] Git Usage

git clone ssh://username@gerrit-url:gerritport/target.git
cd target.git
git remote add mygithub https://github-url/source.git
git fetch mygithub
git checkout --track -b my-newbranch mygithub/master
git checkout master
git merge my-newbranch
git push origin master:refs/for/master


Example :
git clone ssh://kenlin@adelphos.mydlink.com:29418/device_setup_wizard.git
cd device_setup_wizard
git remote add mygithub https://github.com/mydlink/SetupWizardinQT.git
git fetch github
git checkout --track -b mywizard mygithub/master
git checkout master
git merge mywizard
git push origin master:refs/heads/master

沒有留言:

張貼留言