- git server set up
- apt-get install git-daemon-run
- ln -s /home/user/git/xxxProject/.git /var/cache/git/xxxProject.git
- touch /home/user/git/xxxProject/.git/git-daemon-export-ok
- sv restart git-daemon
- git clone git://ip(or hostname)/git/xxxProject
- apt-get install git-daemon-run
- git push
- Must use ssh protocol
- The .git/config file should change from git to ssh , if you use git to clone project
#url = git://jsa8l/git/MyAndroid/ url = ssh://root@jsa8l/mnt/sda/git/MyAndroid
- Create Branch to track with origin
git checkout --track -b <> origin/ <>
- Switch to new branch, and merges code to new branch.
- pull the branch code from remote
- Commit the code.
- Push code to remote git server.
- Must use ssh protocol
- create patch
- For each commit a separate file is created in the current directory.
$ git format-patch origin
- For each commit a separate file is created in the current directory.
- Command
- checkout : http://stackoverflow.com/questions/11990090/git-pull-based-on-sha
- rebase : http://rubyist.marsz.tw/blog/2012-01-17/git-reset-and-revert-to-rollback-commit/ http://ihower.tw/blog/archives/3843 http://blog.yorkxin.org/posts/2011/07/29/git-rebase
- service restart : sudo /etc/init.d/git-daemon restart
- Reference
留言
張貼留言