Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tips:git [2018/09/01 09:32] – [delete remote branch] scipio | tips:git [2019/03/13 09:30] (current) – [apache git] scipio | ||
---|---|---|---|
Line 74: | Line 74: | ||
+ | ===== create branch with current changes ===== | ||
+ | |||
+ | < | ||
+ | git checkout -b newBranch | ||
+ | </ | ||
+ | |||
+ | ===== tag ===== | ||
+ | |||
+ | < | ||
+ | git tag -a v1.1 -m " | ||
+ | git push origin v1.1 | ||
+ | </ | ||
===== new remote branch ===== | ===== new remote branch ===== | ||
Line 120: | Line 132: | ||
git push origin -u new-name | git push origin -u new-name | ||
</ | </ | ||
+ | ===== Preserve specific files while merging ===== | ||
+ | |||
+ | start by defining a merge driver that would always favor our current version of the file | ||
+ | < | ||
+ | git config --global merge.ours.driver true | ||
+ | </ | ||
+ | |||
+ | into repo mark examplefile.json to use that driver instead of the standard one: | ||
+ | < | ||
+ | echo ' | ||
+ | </ | ||
+ | |||
+ | |||
===== integrate changes from one branch into another branch ===== | ===== integrate changes from one branch into another branch ===== | ||
Line 178: | Line 203: | ||
</ | </ | ||
+ | ===== submodule ===== | ||
+ | |||
+ | < | ||
+ | cd < | ||
+ | git checkout master | ||
+ | git branch -u origin/ | ||
+ | cd < | ||
+ | git config -f .gitmodules submodule.< | ||
+ | </ |