User Tools

Site Tools


git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
git [2018/11/12 15:50] – created odeftagit [2023/11/03 10:26] – [Merge changes form master branch in current branch] odefta
Line 2: Line 2:
  
   git reset HEAD~1   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: \\
 +<code>
 +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>
 +</code>
 +
 +====== Disable https ssl verification ======
 +
 +  git config --global http.sslVerify false
 +
 +====== Sync fork with original repo ======
 +<code>
 +git remote add upstream https://gitlab../project.git
 +git stash
 +git checkout master
 +git fetch upstream
 +git rebase upstream/master
 +git stash pop
 +</code>
 +
 +====== Merge changes form master branch in current branch ======
 +
 +<code>
 +git.exe merge remotes/origin/master
 +</code>
 +
 +
 +
 +
 +
 +
 +
 +
git.txt · Last modified: 2023/11/28 23:35 by odefta