Loading...
 
JoiWiki » Developer » Applications » Git » Git Commands Git Commands

Git Commands

Git Commands

 There are many of these, all for different things and with lots of overload switches - here are some!

 

Table of contents:  

Amending the files within your repo

 so I've just accidentally tracked some things that shouldn't have been traked - here's how I fixed it!

 

#Show all files tracked by named branch
git ls-tree -r [BranchName]    --name-only
#remove files by name or matching pattern
git rm --cached [filename]
git rm --cached [Pattern]

#A use that I had for this was
git rm --cached */Debug/*

 

 

Prune your local repo!

So you've deleted some branches from your remote repo but you can still see them when you check your branches? try the following:
 

#remove references to dead remote branches in your local repo
git remote prune origin

 

 

update your branch with changes from master

your branch is going well and development is making progress but now there are changes from someone else that you need to incorporate

git checkout master
# log off of vpn
git pull origin master
git checkout myfeature
git merge master

 

 

 

Created by system. Last Modification: Tuesday March 22, 2022 16:45:36 GMT by JBaker.

Developer