Open main menu

Changes

1,072 bytes added ,  13:02, 31 March 2020
remove template
The bottom line is this: modern software development may take many "forms", but it usually boils down to [http://nvie.com/posts/a-successful-git-branching-model/ this]. Git enables such a branched workflow. That is why distributed version control in general, and git in particular, is the most widely adopted version control system for software development <ref>https://ianskerrett.wordpress.com/2014/06/23/eclipse-community-survey-2014-results/</ref>
{{Messagebox ||type = normalSee [[Git/hacks]] for example commands
|text = See [[Git/hacks]] for example commands
}}
== Intro to Git ==
git config --global diff.tool meld
git config --global --add color.ui true
# store password in memory for an hour
git config --global credential.helper 'cache --timeout=3600'
 
 
# recent packaged versions of git might be 1.8.3.1 (CentOS 7.4) whereas the current available is 2.15.1
# push.default is unset; its implicit value is changing in
http://nvie.com/posts/a-successful-git-branching-model/
 
== Submodules ==
Using multiple repositories to compose your project. See https://git-scm.com/book/en/v2/Git-Tools-Submodules
 
<source lang="bash">
git init myproject
cd myproject
git submodule add git@github.com:example.com/htdocs.git website
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/core.git mediawiki
git submodule add https://gitlab.com/Aranad/tools.git odtools
cd mediawiki/
git checkout REL1_31
cd ../
git commit -m 'initial commit'
git diff --submodule
git config --global diff.submodule log
git diff
git config -f .gitmodules submodule.mediawiki.branch REL1_31
git submodule update --remote
git status
git commit -am 'tracking REL1_31 in the mediawiki submodule'
git config status.submodulesummary 1
git log -p --submodule
cd mediawiki/
git submodule update --remote --merge
git config alias.sdiff '!'"git diff && git submodule foreach 'git diff'"
git config alias.spush 'push --recurse-submodules=on-demand'
git config alias.supdate 'submodule update --remote --merge'
</source>
== Tools ==