I code on my local machine, push it to my remote repository on github and then login via ssh on the target machine, pull it, build it and run it.
This typically requires me to enter my login data everytime I want to do it, on the local machine. I have discovered git cli, so I installed it on the target machine.
$ gh --version
gh version 2.6.0-15-g1a10fd5a (2022-03-16)
https://github.com/cli/cli/releases/latest
I authenticated myself via
$ gh auth login
and now I want to simply pull the latest commit. But there's no pull command. There is a pull request command, i.e. gh pr but this just tells me there aren't any.
How can I simply pull my latest commit, akin to git pull, without needing to type in my login information again?
You could do gh repo sync it will update the local repo by comparing it with the remote repo.
You can‘t (as fas as I know).
The GitHub CLI is a command-line tool to do the work as in GitHub itself like pull requests, issues, GitHub Actions, and other GitHub features.
The same as on GitHub-website, but simple on the command-line. If you want to pull the latest changes from a GitHub repository, you need Git (the version-control tool) and the command git pull.
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