Skip to content

Latest commit

 

History

History
72 lines (56 loc) · 1.78 KB

README.md

File metadata and controls

72 lines (56 loc) · 1.78 KB

Github basic tutorial

  1. Bring the repository to your local machine
git clone https://github.com/soniarodriguez/github-exercises.git
  1. Move to the repository folder
cd github-exercises
  1. Check the status of your local repository
git status

Expected output should be

On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
  1. Move to your feature branch

4a. Create you own feature branch if you are working in a new feature, for instance, adding-london

git checkout -b adding-london

4b. Move to an existing feature branch, to work in a work-in-progress feature, for instance, adding-march-destinations

adding-march-destinations 

If you move to a feature branch, first pull the last changes in case someone else has committed something to that branch:

git pull
  1. Do some modifications to the repository. For example, add your dream destination to index.html

  2. Add your changes to the working branch

6a. Track all the changes

git add .

6b. Track the change of a file modified, for instance:

git add index.html
  1. Package your changes in a commit and label them with a meaningful message
git commit -m “Added Thailand destination”
  1. Add your changes to the remote repository. Then, check the status
git push
git status
  1. Open the browser and visit: https://github.com/soniarodriguez/github-exercises/

  2. Check that your changes are under your working branch

  3. When you think that your new or working feature branch is ready to by merge with master, create a pull request

  4. Merge the master branch with the master branch

  5. Your changes should be visible at: https://soniarodriguez.github.io/github-exercises/