GIT
General
Clone private repo with GitHub Token:
git clone https://username:[email protected]/username/repo_name.gitDefault Branch
Change local branch name for new inits:
git config --global init.defaultBranch mainUpdate after remote renaming:
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -aRemove Git history
Remove all history(make sure you have the backup) using:
cat .git/config # note <github-url>
rm -rf .gitReconstruct the git repo with the current content:
Push the commit to github
Hotfix
Checkout latest tag and create new branch:
Publish branch and create a new release from branch
Commit in past
Last updated