Re: Any command to simplify 'git fetch origin && git reset --hard origin/master'?
- From
David Symonds <dsymonds@gmail.com>
- Date
- Jan 19, 2008, 06:04 UTC
- Message-ID
- <ee77f5c20801182204r53ae03c2mac6d8fde9c4b260a@mail.gmail.com>
- In-Reply-To
- <46dff0320801182122t1581b366yad123407aaad6326@mail.gmail.com>
On Jan 19, 2008 4:22 PM, Ping Yin <pkufranky@gmail.com> wrote:
> I often encounter the case that the origin reposotory is rebased and i > make sure i want to use the origin head as my master > Now I have to do > $ git fetch origin && git reset --hard origin/master
Use "git pull origin", which will do the fetch, and then merge it. If you haven't made local changes, the merge will be a fast-forward and so will get you an equivalent result.
Dave.