Basic Git Commands




Add remote repository

git remote add origin https://github.com/user/repo.git

Check Remote Repository

git remote -v

Change Current Branch Name

git branch -m <newname>

Change Any Branch Name

git branch -m <old-name> <new-name>

Clone/Download

git clone https://github.com/username/projectName.git

Create a new branch

git checkout -b new-branch

Stage All Changes

git stage -all

Add Files

git add .

Commit

git commit -a -m "Commit Comment"

Push

git push origin gh-pages