Today I have noticed in my IDE (IntelliJ) that when I do 'commit and push' from the IDE level I can see in the version control output tab that IntelliJ is using the following command:
git push --progress origin storyBranchA:storyBranchA
I wonder how I can use that 'progress' flag outside of my IDE, is there any nice usage explained somewhere as I cannot find anything about that flag, and why the IDE is actually specifying the branch to commit to as storyBranchA:storyBranchA
and not simply
git push --progress origin storyBranchA
Regards Kris
By using the -a flag when committing you are telling Git to add all files that have been modified and then commit them.
The git status command displays the state of the working directory and the staging area. It lets you see which changes have been staged, which haven't, and which files aren't being tracked by Git.
In Git, we can use git show commit_id --name-only to list all the committed files that are going to push to the remote repository.
The man page for git push
seems to have documented the flag:
--progress
Progress status is reported on the standard error stream by default when it is attached to a terminal, unless
-q
is specified. This flag forces progress status even if the standard error stream is not directed to a terminal.
Since IntelliJ is not launching the program under a terminal, it’s asking Git to report the progress anyway.
The reason for specifying both the local and remote refspec on the git push
command line is that they never optimized for the case when both sides are the same. storyBranchA
is equivalent to storyBranchA:storyBranchA
. It is possible to have the branch named one way locally, and another way remotely. In that case, you'd see something like storyBranchA:someOtherRef
on the command line.
You also don't want to just use git push
blindly because their settings may have git push
setup to push all tracking branches, rather than the single branch that was intended.
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