Git Cheatsheet

Majd Murad and Diana Lozano

Set up your repository

  1. Fork url
  2. Enable issues
  3. Clone url
  4.       git clone "url"
        
  5. Check the remote
  6.       git remote -v
        
  7. Set up your upstream
  8.       git remote add upstream "url"
        
  9. Check the remote again
  10.       git remote -v
        

Fetching Changes

  1. Check the remote for upstream and origin fetch and push
  2.       git remote -v
        
  3. Fetch the changes
  4.       git fetch upstream
        
  5. Merge the changes
  6.       git merge upstream/master
        
  7. Commit and push the changes
  8.       git commit -m "Message for the commit"
          git push origin master
        
  9. Check Github

Git Work Flow and Branching

  1. Add collaborators
  2. Clone the repository
  3. Create Feature Branch
  4. Make your changes
  5. Create a Pull Request
  6. Review Pull Request
  7. Merge Conflicts