Skip to content

Latest commit

 

History

History
34 lines (31 loc) · 2.34 KB

README.md

File metadata and controls

34 lines (31 loc) · 2.34 KB

Git-Workshop-2023

Slides for reference - https://docs.google.com/presentation/d/e/2PACX-1vT7nJYRovLzU8J--OhyiNsIbh__haA0gCPZLw4Nptsd4z7pfos7-8dsZdaTV8PUaukqsd4yfrMjxJkO/pub?start=false&loop=false&delayms=60000

  • 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

Challenge activities

  • 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
  • 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]

Possible Issues

  • 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>.

  • If you need help at any time, feel free to let us know! We'll try and help you resolve the error.