rusefi-1/misc/git_scripts/git_cheat_sheet.txt

97 lines
2.5 KiB
Plaintext
Raw Normal View History

2019-01-03 08:19:17 -08:00
See also https://git-scm.com/downloads
2019-01-12 11:06:29 -08:00
=========================================
Save password locally? Try
git config credential.helper store
2017-03-31 10:47:56 -07:00
=========================================
New remote tag:
git tag -a TAGNAME -m "tag TAGNAME"
git push origin TAGNAME
=========================================
New remote branch:
git checkout -b BRANCHNAME
git push -u origin BRANCHNAME
2019-01-14 16:16:20 -08:00
git checkout -b 2019.01.14_release_1.19.1
git push -u origin 2019.01.14_release_1.19.1
2019-01-27 18:32:41 -08:00
new remote branch from another branch:
2019-03-29 06:38:08 -07:00
git checkout -b stable_19.1.rusefi stable_19.1.x
git push -u origin stable_19.1.rusefi
2019-01-27 18:32:41 -08:00
2017-03-31 10:47:56 -07:00
=========================================
Download submodules:
git submodule update --init
=========================================
Refresh submodules:
git submodule update --recursive --remote
2017-05-03 08:56:59 -07:00
=========================================
Generate diff of specific commit
git diff COMMIT^ COMMIT
(this generates diff between previous to COMMIT and COMMIT)
=========================================
2019-01-27 18:32:41 -08:00
Diff between two branches
git diff origin/stable_17.6.x origin/stable_17.6.rusefi
git diff origin/stable_18.2.x origin/stable_18.2.rusefi --ignore-space-at-eol
=========================================
2017-05-03 08:56:59 -07:00
https://help.github.com/articles/configuring-a-remote-for-a-fork/
git remote -v
git remote add upstream https://github.com/ChibiOS/ChibiOS.git
2018-12-19 18:48:57 -08:00
or
git remote add upstream https://github.com/RomRaider/RomRaider
2017-05-03 08:56:59 -07:00
git remote -v
2019-01-02 19:32:30 -08:00
See also git_scripts/git_add_upstream.bat
2019-06-07 07:52:32 -07:00
=========================================
Cherry-pick from fork
git remote add mck1117 https://github.com/mck1117/rusefi
git fetch mck1117
git cherry-pick 0b004bb2af9c16a79225bd875f0046392993d957
git push
2017-05-03 08:56:59 -07:00
=========================================
https://help.github.com/articles/syncing-a-fork/
2018-01-23 10:59:20 -08:00
git fetch upstream
2019-02-26 07:04:04 -08:00
git merge upstream/stable_18.2.x
2018-12-19 18:48:57 -08:00
or
git merge upstream/master
2018-01-23 10:59:20 -08:00
git push
2017-05-03 08:56:59 -07:00
2017-05-22 10:23:28 -07:00
http://stackoverflow.com/questions/9646167/clean-up-a-fork-and-restart-it-from-the-upstream
2018-12-19 18:48:57 -08:00
2019-01-02 19:32:30 -08:00
See also git_scripts/git_reset_to_upstream.bat
2018-12-19 18:48:57 -08:00
=========================================
https://stackoverflow.com/questions/19279490/can-i-fork-another-persons-repo-twice-into-my-own-account
git clone http://github.com/RomRaider/RomRaider RomRaider_copy_2
cd RomRaider_copy_2
git remote remove origin
git remote add origin https://github.com/rusefi/RomRaider_copy_2.git
git push -u origin master
=============================
rusEfi .git folder take about 500M on disk. Is it possible to reduce this size?
2018-12-19 18:48:57 -08:00
A proper answer is to split or re-create rusefi repo, but in the meantime:
2018-12-19 18:48:57 -08:00
See git_gc.bat