Git: Automatic recovery from remote repositories?
source link: https://www.codesd.com/item/git-automatic-recovery-from-remote-repositories.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Git: Automatic recovery from remote repositories?
One irritating thing I find about using command line Git is having to manually sync my repository with remote repositories. I constantly get tripped up by commands like "git status" that I (mistakenly) expect to report the difference between my working directory and a repository on GitHub. (Of course it reports the difference between my working directory and my local repository...)
Is there any way to get automatic/implicit fetching, so that remotes are always up to date? I would happily pay a penalty of a few seconds for commands like git status, git merge etc.
One of those commands is already built in.
git pull
does a fetch and a merge.
For the other one, well....define your own command, such as
alias gitfu='git fetch; git status'
The shell is yours to command.
Depending on your configuration you may be asked for pass phrase or credentials for each of these.
Related Articles
Git: linking local and remote repositories
Maven: xml files of metadata often downloaded from remote repositories
Automatic recovery from availability zone unavailability?
Git: automatically pull from the repository?
Git repository recovery from objects only
Retrieve unreferenced commitments from remote GIT repository
git with IntelliJ IDEA: Unable to read from remote repository
Create a remote repository from local repositories, Pycharm
push git to remote repository & ldquo; Can not read from remote repository & rdquo;
How to stop Maven from watching in all remote repositories for app dependency files that are already installed in my local repository?
git master behind the remote master (not normally)
Git push diverges the remote and local branch
& ldquo; Could not read from remote repo & rdquo; & hellip; but I am the owner?
Explain the output of cat .git / config for tracking remote branches?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK