Is there a way to get git status to show 2 remotes?
Basically I have origin set to the Fork of a github project and upstream to the Fork's parent project. On the github page for my Fork it lists something like this
This branch is 1 commit ahead, 9 commits behind othergithubuser:master
Essentially, I'm looking for git status(or some way) to replicate this
.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/mygithubuser/project.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "upstream"]
url = https://github.com/othergithubuser/project.git
fetch = +refs/heads/*:refs/remotes/upstream/*
Command #1: git branch -r This Git command will show you remote branches. The -r flag here is short for --remotes . This is the command I use personally.
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. Status output does not show you any information regarding the committed project history.
Use the git status command, to check the current state of the repository.
What you are asking isn't supported in GIT yet.
When you run git status its comparing your current working directory & index against the current HEAD.
Keeping the above in mind we can see that git doesn't care where the content came from or will it be pushed
to. Its like that by design.
If you stop for a moment and you think about it it makes sense that git status
has no clue from where and to where the code will go to.
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