We'll start practicing what we've learnt by creating a github repository and making our changes available through it.
- Use or create your github account.
- Download Git if it's not already installed in your system.
- Open your computer's Terminal and type
git. If everything is ok you should not see any error message. - go to your documents directory and create a new folder for this training.
$ cd documents
$ mkdir push-dev
$ cd push-dev
- By staying at the
push-devfolder, Clone this repo:
$ git clone https://github.com/pushdev-code/git-tutorial.git
$ cd git-tutorial
- Create a new branch with following this name convention:
$ git checkout -b feature/your-full-name
- go to 4-students folder and create a markdown file using your name:
$ cd 4-students
$ touch your-full-name.md
Edit this file and include some comment about your opinion on Git.
Note: touch command won't work on Windows, use echo.> your-full-name.md.
- Add this file to the repository:
$ git add 4-students/your-full-name.md
- Commit your changes, including a good commit message:
$ git commit -m "Include a meaningful description of your changes"
-
Make sure to share your github username with us so you can be a collaborator and have permissions to push code and create Pull Requests, they will be necessary for the upcoming steps.
-
Push your changes to the remote branch:
$ git push -u origin feature/your-full-name
- Go to https://github.com/pushdev-code/git-tutorial and create a new Pull request. The button for your branch should appear when the page has loaded. If the button doesn't appear, click on pull requests link.
- Make sure your Pull request base is the
masterbranch. - Please include
pushdev-code,fabianmarinogandjuancho11gmas reviewers so your changes can be approved. - Changes can be requested by the reviewers, check your email for any updates.
- Wait until the Pull request is approved and merged into master.
- To see your changes in the
masterbranch:
$ git checkout master
$ git pull
That's it. Your changes should be now part of the main master branch.