Common Git Commands

#On Server
-----------
git init --bare

#On Client
-----------
git init
git remote add reponame user@server:/path/to/repo.git
git push name-of-repo master

#List Remote
--------------
git remote -v
origin  git@hostname:USERNAME/REPOSITORY.git (fetch)
origin  git@hostname:USERNAME/REPOSITORY.git (push)

#Change Remote url
-------------------
git remote set-url origin https://hostname/USERNAME/REPOSITORY.git

Share this post