git - holding the commits and pulling a repository, and then pushing the commits -


i git-beginner, apologies naive question:

i turning local repo mess doing following:

changing things , committing them not pushing. repository on server has been changed other users. ideally want ignore commits, pull last version server, , commit change , push. there way of doing this?

assuming master branch involved, this:

$ git pull --rebase origin master 

you pull changes master branch, commits rebased if had first pulled new changes, , then, started making changes , committed.

you can just

$ git pull 

but you'll end merge commit. rebase first (or pull --rebase) keep history easier read.

check out these git tutorials: https://www.atlassian.com/git/


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -