howto-git
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howto-git [2012-11-04 09:32] – [Pushing big files] glen | howto-git [2016-03-21 10:36] (current) – looks like sskm allows add conflicting names, and then ends up getting stuck glen | ||
---|---|---|---|
Line 7: | Line 7: | ||
=====Prepare working dirs==== | =====Prepare working dirs==== | ||
- | Move existing '' | + | Move existing |
mv ~/rpm ~/rpm.cvs | mv ~/rpm ~/rpm.cvs | ||
| | ||
Line 17: | Line 17: | ||
cd ~/ | cd ~/ | ||
./builder -v -bp python-msgpack | ./builder -v -bp python-msgpack | ||
- | =====Set your configuration==== | + | ===== Set your configuration ==== |
Your identity (NOTE: This sets globally): | Your identity (NOTE: This sets globally): | ||
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:// | ||
+ | < | ||
+ | git config --global push.default simple | ||
+ | </ | ||
=====Download package===== | =====Download package===== | ||
Line 55: | Line 66: | ||
| | ||
- | | + | cd ~/ |
Line 73: | Line 84: | ||
usually called '' | usually called '' | ||
'' | '' | ||
- | |||
=====Commit your changes===== | =====Commit your changes===== | ||
First you put your changes in a staging area - the index: | First you put your changes in a staging area - the index: | ||
Line 113: | 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 153: | Line 168: | ||
There' | There' | ||
+ | After you found you pushed and was rejected by big file restriction, | ||
+ | <code bash> | ||
+ | echo 7.3.640 > .bigfiles | ||
+ | git add .bigfiles | ||
+ | git commit --amend | ||
+ | git push origin master | ||
+ | </ | ||
=====Graphical repository browser===== | =====Graphical repository browser===== | ||
Line 187: | 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 208: | Line 239: | ||
Generate pair ( '' | Generate pair ( '' | ||
| | ||
+ | |||
+ | <note warning> | ||
+ | **IMPORTANT**: | ||
+ | </ | ||
Add it (as key '' | Add it (as key '' | ||
Line 214: | 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.1352017924.txt.gz · Last modified: 2012-11-04 09:32 by glen