git push --force by default -


when git push, git forced updates automatically if necessary, if had specified --force option. have configured long time ago. don't want behavior anymore, , can't find configuration variable affects behavior. can't find relevant in .gitconfig or .git/config files.

edit: added current config files:

my .gitconfig:

[user]     name = xxxx xxxx     email = xxxx [core]     excludesfile = /users/xxxx/.gitignore_global [difftool "sourcetree"]     cmd = opendiff \"$local\" \"$remote\"     path =  [mergetool "sourcetree"]     cmd = /applications/sourcetree.app/contents/resources/opendiff-w.sh \"$local\" \"$remote\" -ancestor \"$base\" -merge \"$merged\"     trustexitcode = true 

local repo config:

[core]     repositoryformatversion = 0     filemode = true     bare = false     logallrefupdates = true     ignorecase = true [remote "origin"]     url = ssh://xxxx@xxxx.com/var/git/tw     fetch = +refs/heads/*:refs/remotes/origin/*     push = +refs/heads/*:refs/heads/* [remote "audiocopy"]     url = /users/xxxx/src/audiocopy/myacp     fetch = +refs/heads/*:refs/remotes/audiocopy/* [submodule "sources/iphoneinterface/soundcloud/cocoasoundcloudapi"]     url = git://github.com/soundcloud/cocoasoundcloudapi.git [submodule "sources/iphoneinterface/soundcloud/cocoasoundcloudui"]     url = git://github.com/soundcloud/cocoasoundcloudui.git [submodule "sources/iphoneinterface/soundcloud/jsonkit"]     url = git://github.com/nxtbgthng/jsonkit.git [submodule "sources/iphoneinterface/soundcloud/oauth2client"]     url = git://github.com/nxtbgthng/oauth2client.git [submodule "sources/iphoneinterface/soundcloud/ohattributedlabel"]     url = git://github.com/nxtbgthng/ohattributedlabel.git [branch "linux"]     remote = origin     merge = refs/heads/linux 

remote repo config:

[core]     repositoryformatversion = 0     filemode = true     bare = true 

sample run:

~/src/tw % git push counting objects: 7, done. delta compression using 8 threads. compressing objects: 100% (3/3), done. writing objects: 100% (3/3), 394 bytes, done. total 3 (delta 2), reused 0 (delta 0) ssh://xxxx@xxxx.com/var/git/tw    26636fd..4247b2e  guile20 -> guile20  + e80b72f...3578ee1 linux -> linux (forced update) ~/src/tw % 

from [remote "origin"] config entry looks you've set mirroring push. if not wanted rid of line entirely. if happy mirror style push don't want force (this doesn't make lot of sense me), want remove + prefix push line in [remote "origin"] section of local repository's config.

alternatively:

git config --unset remote.origin.push 

or:

git config remote.origin.push 'refs/heads/*:refs/heads/*' 

depending on choice make.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -