git push without a target-end merge (pull is to fetch as push is to ???) -


say have repo, let's call origin. clone repo, working. make changes (and commit them locally). want push them origin.

my understanding of git push "no, origin working copy, overwrite it". have used option (in origin) allow pushes overwrite current working copy, , allow pushes. there way (with or without that), allow pushes add commit tree, not update origin/master or mess working directory?

in effect, git push inverse of git pull (acquire updates , update working directory); inverse of git fetch (acquire updates)?

i rather consider git push reverse of git fetch.

git pull git fetch + git merge.

for pushing, best practice use remote bare repo, because if pushing branch checked out remote non-bare repo, working tree won't updated, means push rejected default.
mentioned in "git push bare repositories?":

it ok push other branch in non-bare repository.

that might closer looking for: push branch isn't 1 checked out remote (non-bare) repo.


Comments