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

Sunday, August 1, 2021

del command prompt doesn't delete directory - use rd instad

 


If you use del with a directory name then it will delete the files in the directory. The directory specified is not deleted.


If a folder name is given instead of a file, all files in the folder will be deleted, but the folder itself will not be removed.

To delete both directories and the files and subdirectories use rd (an alias for rmdir):