/BHlab_exercise1

A short exercise to clone this repo and modify the file locally

BHlab_exercise1

A short exercise to clone this repo and modify the file locally

git_instructions


Tasks for everyone

  • Create a GitHub account
  • Clone this GitHub repository, make changes and push your commit to GitHub
  • Create your own repository
  • Make changes in your repo, and push your commits to GitHub
  • Fork a repo (e.g. this one), and open a pull request

git key commands:

Only do this once, the first time you need to access this repository. This will clone the repository so you can access it locally

$ git clone https://github.com/marta-vidalgarcia/BHlab_exercise1.git

Go inside the folder.

$ cd BHlab_exercise1 

You can then see that there is a .git object here

$ ls -la

This gives an overview of the local working directory and the staging area. You will see whether there are "Untracked files", any staged changes, whether your local repo is up to date with the remote, etc.

$ git status 

Pull, pull, pull. Pull each single time before commiting & pushing any of your changes, even if you are the sole contributor to your repo. You might have worked on it from another computer, so pull all new changes before adding your new work.

$ git pull # every single time before adding any new files and/or files with changes

Add the files you have been working on (they will appear as untracked with "$ git status")

$ git add <my file>

Commit your changes. Give an informative description. We don't want a two word commit (e.g. added file), or a paragraph

$ git commit -m "I added my file and I give a description of what I changed or added"

Finally push your changes to the remote repo!

$ git push

Great job!!!