This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
download [2018/10/08 17:45] oschuett |
download [2018/12/10 12:41] (current) tmueller update instructions for new CP2K-with-DBCSR-submodule |
||
---|---|---|---|
Line 53: | Line 53: | ||
The code in Git is under constant development. Check the [[http://dashboard.cp2k.org| Dashboard]] for current issues. | The code in Git is under constant development. Check the [[http://dashboard.cp2k.org| Dashboard]] for current issues. | ||
</note> | </note> | ||
+ | |||
+ | The [[https://git-scm.com/|Git]] (''git'') program must be installed on your machine for this to work. | ||
+ | |||
+ | === Initial checkout === | ||
The latest and all prior versions are available from the [[https://github.com/cp2k/cp2k/|CP2K GitHub repository]]. | The latest and all prior versions are available from the [[https://github.com/cp2k/cp2k/|CP2K GitHub repository]]. | ||
Line 59: | Line 63: | ||
<code> | <code> | ||
- | git clone https://github.com/cp2k/cp2k.git cp2k | + | git clone --recursive https://github.com/cp2k/cp2k.git cp2k |
</code> | </code> | ||
Line 65: | Line 69: | ||
<code> | <code> | ||
- | git clone -b support/v6.1 https://github.com/cp2k/cp2k.git cp2k | + | git clone --recursive -b support/v6.1 https://github.com/cp2k/cp2k.git cp2k |
</code> | </code> | ||
- | Your clone of the Git repository (any branch) can be updated using the following commands: | + | === Keeping your clone up-to-date (Git >= 2.14) === |
+ | |||
+ | Set the following once on your CP2K Git clone. It will tell Git to automatically update included submodules as well and to always use rebase instead of merge. | ||
+ | |||
+ | <code> | ||
+ | cd cp2k | ||
+ | git config submodule.recurse true | ||
+ | git config pull.rebase true | ||
+ | </code> | ||
+ | |||
+ | After setting this option, update with the following: | ||
<code> | <code> | ||
cd cp2k | cd cp2k | ||
Line 74: | Line 89: | ||
</code> | </code> | ||
- | The [[https://git-scm.com/|Git]] (''git'') program must be installed on your machine for this to work. | + | If you want to set the options globally (valid for all Git commands on your machine), you can use the ''%%--%%global'' parameter for ''git config'': |
+ | |||
+ | <code> | ||
+ | git config --global submodule.recurse true | ||
+ | git config --global pull.rebase true | ||
+ | </code> | ||
+ | |||
+ | === Keeping your clone up-to-date (Git < 2.14) === | ||
+ | |||
+ | Set the following once on your CP2K Git clone. It will tell Git to always use rebase instead of merge. | ||
+ | |||
+ | <code> | ||
+ | cd cp2k | ||
+ | git config pull.rebase true | ||
+ | </code> | ||
+ | |||
+ | After setting this option, update with the following: | ||
+ | |||
+ | <code> | ||
+ | cd cp2k | ||
+ | |||
+ | git pull | ||
+ | git submodule update --recursive | ||
+ | </code> |