git config --global user.name "YOUR NAME"
git config --global user.email "YOUR EMAIL"
git config --list
git clone --branch <branchname> <remote-repo-url>
git checkout -b <branch-name>
Create and check out a new branch named <branch>. Drop the -b flag to checkout an existing branch.
git merge --no-ff <BRANCH-TO-MERGE> -m "<COMMIT MESSAGE>"
git rebase -i
Enter git add --all at the command line prompt in your local project directory to add the files or changes to the repository
git reset --soft HEAD~1
git commit -a -m '17. Understanding "methods" in Vue Apps~'
git add . add all files except deleted files
How to change the timestamp of an old commit in Git (use Git Bash not PowerShell)
git rebase -i <commit-hash>^ or git rebase -i HEAD~6 (choose the number)GIT_COMMITTER_DATE="Fri Dec 30 09:45 2022 +1300" git commit --amend --date="Fri Dec 30 09:45 2022 +1300" --no-edit (both commit time and author time)git rebase --continueCheck time using git log --pretty=fuller
rename a branch
git branch -m <old-name> <new-name>
if you are already on the local branch to be renamed
git branch -m <new-name>