User Tools

Site Tools


git

Undo last commit

git reset HEAD~1

Rename default branch master

git config --global init.defaultBranch main

This was done for ethical reasons.
If the default 'master' folder is used, you'll receive the following warning:

hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:   git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:   git branch -m <name>

Disable https ssl verification

git config --global http.sslVerify false

Sync fork with original repo

git remote add upstream https://gitlab../project.git
git stash
git checkout master
git fetch upstream
git merge upstream/master
git stash pop

Merge changes form master branch in current branch

git.exe merge remotes/origin/master
git.txt · Last modified: 2023/11/28 23:35 by odefta