Slides for reference - https://docs.google.com/presentation/d/15mr6dgsPVxKN2CCUypVuiLynnewNuAAhR8HBcFjTDrI/edit#slide=id.g2914a6f9f14_0_11
- Have one person fork this repository on GitHub and invite others as collaborators
- To add collaborators: Settings → Collaborators
- Have each person pull the project into their local repository
- git clone [HTTPS url]
- Modify your functions and merge the changes
- a merge conflict should occur. Try fixing it together with git rebase
- Create a new local branch with all the changes from main, and checkout that branch
-
! git branch, git checkout
-
- Make changes without committing and stash them. Then checkout main branch again
-
! git add, git commit, git stash, git checkout
-
- Make additional changes to main branch and commit multiple times without pushing
-
! git add, git commit
-
- Squash all unmerged commits and push to the remote repository
-
! git rebase -i HEAD~[number of commits to squash]. Check this resource https://www.internalpointers.com/post/squash-commits-into-one-git
-
- Switch back to your local branch, pop the changes and push the branch to a remote branch of the same name
-
! git checkout, git stash pop, git add, git commit, git push -u origin [branch_name]
-
-
Unable to link your Git and GitHub account together
$ git config --global user.name "Your name here"
$ git config --global user.email "[email protected]"
-
Unable to rebase
git config pull.rebase true
-
When trying to push, you get the error
remote: Permission to .../.git denied to <username>.
- Check this link to update your credentials (macOS): https://docs.github.com/en/get-started/getting-started-with-git/updating-credentials-from-the-macos-keychain
- Delete any old credentials
- Create a new security token: Click your profile picture on top right --> Settings --> Developer Settings --> Personal Access Tokens --> Fine-grained tokens. Generate a new token with "All Repositories" selected, and give yourself all repostory + account permissions. Save this token.
- Try pushing again, it should prompt you for username and password. Paste the token for the prompted password.
- Check this link to update your credentials (macOS): https://docs.github.com/en/get-started/getting-started-with-git/updating-credentials-from-the-macos-keychain
-
If you need help at any time, feel free to let us know! We'll try and help you resolve the error.