Exclude configured refs for git push -


when call git remote show <remote_name> see below

  local branches configured 'git pull':     master           merges remote master   local refs configured 'git push':     master           pushes master           (up date) 

how can exclude configured pushes? git push master branch throw error , push explicit remote name git push <remote_name> <remote_branch_name>

if change gitconfig of push.default nothing need specify <remote_name> , <remote_branch_name> every time on branches.

git config --global push.default nothing (remove --global project specific config)

after setting should error similar following when git push.

fatal: didn't specify refspecs push, , push.default "nothing".

update:

if want disable automatic pushing specific branch remove tracking config.

one way edit project's .git/config , delete [branch="branchname"] config.

or programmatically: git config --unset branch.branchname.remote removes remote=remotename part of branch's config.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -