💾 Archived View for gluonspace.com › doc › git_cheat_sheet.gmi captured on 2023-04-26 at 13:18:16. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-03-01)
-=-=-=-=-=-=-
git config --global user.name "first_name last_name" git config --global user.email "email"
git clone path_to_repo
git add file_name git commit [-m "message"]
or
git commit -a [-m "message"]
cd folder git init git add . git commit
Navigate to the target repo and on the top-right corner click fork.
Navigate to your fork of the repo and copy the clone URL.
git clone https://github.com/your_username/repo.git
Navigate to the target repo and copy the clone URL.
cd fork_folder git remote -v git remote add upstream https://github.com/fork_username/repo.git git remote -v git fetch upstream git checkout master git merge upstream/master
git branch branch-name git checkout branch-name
or
git checkout -b branch-name