💾 Archived View for gluonspace.com › doc › git_cheat_sheet.gmi captured on 2022-03-01 at 15:07:00. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
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