Download Git @ https://git-scm.com/downloads , or sudo pacman -S git
for arch based distros
Give your commits a signature / credits
$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]
git init
to initialize git inside your current directory
git add
to track a file
git add .
to track all files in directory
git rm --cached <file name>
to untrack a file
git commit
to commit the added/staged files\
-m "<message here>"
-m "<message here>" -m "<description here>"
git commit -am
to commit files that you tracked before (no need togit add
them)
git status
to see which files are (un)tracked or modified
git checkout <branch name>
to change the current branch
git clone <repo link>
to clone a remote repo to your local machine inside the current directory
git <branch> --unset-upstream
> git config credential.helper store
> git push https://example.com/repo.git
Username: <type your username>
Password: <type your password/token>