What does git merge 'do without arguments?

I saw people doing

git merge

i.e. using "git merge" with no arguments. It seems like this can do something useful. But I could not find the documentation for this script on git -scm.com.

What does git merge do in this scenario?

+4
source share
1 answer

He will try to merge his branch upstream ( git merge)

If no commit is sent on the command line, merge the remote tracking branches that the current branch is configured to use as its upstream.

So, check if there is a branch associated with it upstream repository:

git config remote.$(git config branch.$(git symbolic-ref --short HEAD).remote).url

This uses:

+6

Source: https://habr.com/ru/post/1654664/


All Articles