Git Skills - zhuje/openshift-wiki GitHub Wiki
- View what remote repositories you're currently linked to
$ git remote -v
#returns
origin <fork-repo-url> (fetch)
origin <fork-repo-url> (push)
- Add a the upstream repository
$ git remote add upstream <original-repo-url>
#returns
origin <fork-repo-url> (fetch)
origin <fork-repo-url> (push)
upstream <original-repo-url> (fetch)
upstream <original-repo-url> (push)
- Fetch latest commits from upstream repo
$ git fetch upstream
Source:
https://adiati.com/git-how-to-fetch-a-branch-from-the-upstream-to-the-local-repo-in-5-steps
# get the latest commits from upstream repo
$ git fetch upstream
# switch to 'main'/'master' branch
$ git checkout main
# merge the latest upstream commits into your forked repo
$ git merge upstream/main
# check the git logs to make sure you received the latest commits
$ git log
git remote set-url origin git://new.url.here
Source:
https://stackoverflow.com/a/16330439/13661104
https://github.com/AICoE/workshop-intern-bootcamp-git
# any line that begins with a # (hashtag) is a comment
$ any line that begins with a $ (dollar-sign) is a Command Line Argument to be entered into a CLI command line interface (e.g., a terminal)
$ <fooBar> any argument within <> (the greater and less than symbols) is supposed to be replaced with something specific determined by the user (e.g., $ open <fooFile>, $ open my_file.txt)
https://docs.github.com/en/codespaces/the-githubdev-web-based-editor

https://docs.google.com/document/d/1QzVjhJvBohDoR3Uj4PonT_c-Y31P4wgK3VdyWBSvr0Q/edit