Git is an distributed version control system. It is used for tracking file changes, and serves as a collaboration tool.
fork this repository.
https://github.com/AustinMay1/how-to-git
clone your forked repo to your local machine.
git clone https://github.com/YourUsername/how-to-git.git
create a local branch to make changes on. name this branch your initials + todays date. for example AM-11032023
.
2 options here:
- create and checkout at the same time
git checkout -b new-branch-name
- create then checkout
git branch new-branch-name
git checkout new-branch-name
make some changes! add your name to the bottom of this document here.
stage your changes.
git add .
or
git add filename
commit your changes. you should always strive for your commit messages to be very specific about the changes you have made. in this case it doesn't matter to much. just put your initials or something.
git commit -m "commit message"
push your changes to your branch. it is important that you specify your branch name in this step.
git push origin -u your-branch-name
open a pull request! navigate to GitHub in your browser and head to your forked repository. You should now see an option to open a pull request to be merged to the main repository.
Sit back, relax, and await for approval!
fork this repository.
https://github.com/AustinMay1/how-to-git
clone the forked repo to your local machine. Make sure to set your local path
to somewhere easily accessible such as C:\user\Documents
.
file > clone repository
create a new branch to make changes on. name this new branch your initials plus todays date AM-11022023
.
branch > new branch
open the repository in your code editor (assuming Visual Studio Code)
repository > open in visual studio code
make some changes! check in at the bottom of this document here.
back in GitHub Desktop, on the left hand side ensure that you have the files you have changed checked off and at the bottom write out a commit message, then click Commit to your-branch-name
. You should then see an option to publish this branch
or Ctrl+P
.
back on GitHub, navigate to your forked repo and you should now see an option for openening a pull request.
Sit back, relax, and await for approval!
- Austin May
- Christopher Turcotte