- Cloning repositories
- Creating your own branch
- Adding and committing files to your own branch
- Pushing your branch to a remote repository
- Git proficiency is crucial for working with source code in a collaborative way
- Employers often share that they like students to have some coding skills, including using git
- By learning to use git, you can collaborate on open source projects as well as share your own
- Clone this repository to your development environment
- Create a branch named your firstname-lastname. For instance, Grace Hopper would create a branch called grace-hopper
- Go to index.html and add an
<h1>element that contains your name. - Add and commit your changes.
- Push your local firstname-lastname branch to GitHub.
- Open up your terminal application
- Navigate to your projects directory or wherever you normally add new projects.
- Clone this repository:
git clone https://github.com/WGU-Cybersecurity-Club/Git-Practice.git - Change directories into your copy of this project
cd Git-Practice - Create a branch in your name.
git checkout -b firstName-lastNamewhere the first and last names are your first and last name. - Run
git statusto double check the new branch is created and you are working inside of it. - In your prefered editor, open up
index.htmland add anh1tag with your name. Be sure to save your work. - Running
git statusshould show that you have uncommitted changes inindex.html - Running
git diffshould show the changes that you have made to any files. - Run
git add index.htmlto add the changesindex.html - Run
git commit -m "adding my changes to index.html" - Run
git push -u origin firstName-lastName - In your browser, navigate to this repository on GitHub and double check to make sure your branch is pushed.