git and sourcetree use of (a)

One.

Question: distal warehouse, a branch or tag has been removed, there is still local, ordinary pull operation can not be synchronized.

solve:

git fetch origin --prune --prune-tags

This command will delete the sync does not exist in the remote branches and labels locally, then the distal end of the latest branches and tags get down.

prune, as the name suggests, trim.

If you want to prune, do not want to fetch, can be performed:

git remote prune origin

 

Second,
if you do not like the command line, you can also add sourcetree of custom actions , Tools - Options - Custom Action:

Run the script to fill git path to the program, is the content of the command line parameters, random play menu title

After the addition, in a warehouse tab page, select the menu: Operation - Custom Action - refresh remote branches and tags, to ok friends.

 

sourcetree customizations more could be done, for example, to execute a shell script,

At this time the implementation of the program selection git-bash.exe, parameters are written shell script path, the path should be like /c/users/xxx1/xxx2/xx3.sh.

As for mac systems, windows and add nearly the same way, in addition to the implementation of different programs.

 

three.

sourcetree need to push scratched push all the tags , unless you really know what to do

If you do not ticked off, then once the distal deleted tag, and you do not delete locally, and then this tag will push back the far end.

Guess you like

Origin www.cnblogs.com/gongziyiyi/p/11012662.html