git config user.name "<userName> git config user.email "<userEmail>"
# Remove the files from the index: git rm --cached <fileName> # For a directory: git rm -r --cached <directoryName>
# Cloning a project with submodules: git clone <projectURL> cd <projectDir> git submodule init git submodule update # A more condensed way to do the same: git clone --recurse-submodules <projectURL>
cd <submodule> git checkout -b <newBranch> git push <remote> <newBranch>
cd <submodule> git pull <remote> <branch>
# Save current work: git stash # Switch to another branch and work... # List if something has been saved: git stash list # Restore work in progress: git stash apply
git log --graph --oneline --all
Local branch:
git branch -d <branch>
Replace -d switch by -D switch to force deletion if the branch has not been merged.
Remote branch:
git push <remote> --delete <branch>
See this link.
git checkout --orphan full_review git rm -r --cached * git clean -fxd git commit --allow-empty -m "Empty commit" git branch empty git merge main --allow-unrelated-histories git push origin full_review git push origin empty
Then, create a pull request for full_review against empty.