This question is very general and there are a couple of assumptions I'll make to simplify it a bit. We'll assume that you want to update your master
branch.
If you haven't made any changes locally, you can use git pull
to bring down any new commits and add them to your master
.
git pull origin master
If you have made changes, and you want to avoid adding a new merge commit, use git pull --rebase
.
git pull --rebase origin master
git pull --rebase
will work even if you haven't made changes and is probably your best call.