howto-git
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howto-git [2014-06-30 17:37] – glen | howto-git [2016-03-21 10:36] (current) – looks like sskm allows add conflicting names, and then ends up getting stuck glen | ||
---|---|---|---|
Line 25: | Line 25: | ||
</ | </ | ||
- | One can do it per package too in each '' | + | One can do it per package too in each '' |
- | [user] | + | [user] |
- | email = < | + | email = < |
- | name = Your Name | + | name = Your Name |
+ | </ | ||
but as for now one needs to set it in each package fetched. | but as for now one needs to set it in each package fetched. | ||
If you have an RW access to PLD Linux repositories please use | If you have an RW access to PLD Linux repositories please use | ||
- | your PLD Linux alias < | + | your PLD Linux alias '' |
+ | |||
+ | If you have github account and wish github mirror being updated with your credentials (referencing github resources, closing pull request), you may wish to setup SSH Agent forwarding so that github sync is performed with your credentials. You need to have same key or github key in ssh agent. Such '' | ||
+ | Host git.pld-linux.org | ||
+ | ForwardAgent | ||
+ | </ | ||
Additionally some useful git config: | Additionally some useful git config: | ||
- | Enable colored | + | Enable colored |
git config --global color.ui auto | git config --global color.ui auto | ||
</ | </ | ||
- | Add '' | + | Add '' |
git config --global alias.st status | git config --global alias.st status | ||
git config --global alias.ci commit | git config --global alias.ci commit | ||
git config --global alias.up pull --rebase | git config --global alias.up pull --rebase | ||
+ | git config --global alias.ssh '!ssh git@git.pld-linux.org' | ||
</ | </ | ||
- | when pushing in git-core-1.8.0 ([[http:// | + | when pushing in git-core |
< | < | ||
git config --global push.default simple | git config --global push.default simple | ||
Line 116: | Line 123: | ||
git push --dry-run origin master | git push --dry-run origin master | ||
+ | ===== Modify commit messages ===== | ||
+ | |||
+ | commit messages can be annotated with '' | ||
+ | |||
+ | Read more on mailing list: http:// | ||
=====Update your repository===== | =====Update your repository===== | ||
Line 196: | Line 208: | ||
Often it is good idea to start working over new spec starting from spec templates available: | Often it is good idea to start working over new spec starting from spec templates available: | ||
git clone git:// | git clone git:// | ||
+ | |||
+ | ===== Rename package ===== | ||
+ | Assume we want lowercase python-Flask: | ||
+ | $ ssh git@git.pld-linux.org | ||
+ | try build to download new version: | ||
+ | nice builder -v python-flask | ||
+ | rename spec file: | ||
+ | $ cd python-flask/ | ||
+ | $ git mv python-Flask.spec | ||
+ | Update spec with name change and commit changes. | ||
=====More information on git===== | =====More information on git===== | ||
Line 217: | Line 239: | ||
Generate pair ( '' | Generate pair ( '' | ||
| | ||
+ | |||
+ | <note warning> | ||
+ | **IMPORTANT**: | ||
+ | </ | ||
Add it (as key '' | Add it (as key '' | ||
Line 223: | Line 249: | ||
Confirm (using -i of new key ): | Confirm (using -i of new key ): | ||
ssh -i ~/ | ssh -i ~/ | ||
- | |||
===== More to read ===== | ===== More to read ===== | ||
http:// | http:// |
howto-git.1404142643.txt.gz · Last modified: 2014-06-30 17:37 by glen