Friday, September 17, 2021

various Git Commands

Clone a Repository

 git clone https://github.com/OCV/pat.git


List of Branches

 git branch -a

Checkout a Brach

 git checkout BranchName


Clean the files created by you 

git clean -f   --- to clean files 

git clean -n -f ---list files before you clean....


Pull new contents from Remote to local

git pull branchName

 

Reset the local branch - undo all changes in local

git reset --hard feature/barnchName  --- to repoint to begining.

 git reset --hard origin/master

 git show-branch