vendredi 29 mars 2019

[Git] difference upstream / origin

upstream generally refers to the original repo that you have forked
origin is your fork: your own repo on GitHub, clone of the original repo of GitHub

git : reset your branch to the upstream branch

git checkout yourbranch
git remote add upstream https://.......
git fetch upstream
git reset --hard upstream/master
# take care, this will delete all your changes on your forked yourbranch
git push origin yourbranch --force

https://stackoverflow.com/a/42332860

git : adding an upstream

git remote add upstream https://....

git : how to do a local rebase

git clone <origin>
git checkout <featbranch>
git pull
git remote add upstream https://.....
git fetch upstream
git rebase upstream/development
git push 

git : remove a submodule

git submodule deinit -f -- a/submodule    
rm -rf .git/modules/a/submodule
git rm -f a/submodule

Source : https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule

git clone : server certificate verification failed

Solution:

export GIT_SSL_NO_VERIFY=1
or
git config --global http.sslverify false

Categories