My normal process for merging in develop to my feature\my-feature branch is:
name@home ~/myRepo (feature/my-feature)
$ git checkout develop
$ git pull
$ git checkout feature/my-feature
$ git merge develop
$ git mergetool
Can this be replaced with:
name@home ~/myRepo (feature/my-feature)
$ git fetch
$ git merge origin/develop
$ git mergetool
Does fetch retrieve enough information about the changes from the remote origin/develop to allow me to merge from origin/develop rather than develop?
Is it bad practice to have feature/my-feature ahead of develop with changes from the remote origin/develop?
You can directly pull your remote branch develop, but you may need to mention the remote repository (in your case, origin):
git checkout feature
git pull origin develop
This will result in a merge commit, where the message mentions origin/develop.
Without mentioning the remote repo, I'm afraid that the merge part of the pull would merge your local branch develop, not the fetched one. But do try it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With