Skip to content

Instantly share code, notes, and snippets.

@BaReinhard
Created October 5, 2017 17:46
Show Gist options
  • Save BaReinhard/95602b1bc2406d5506c3159d72feb4e0 to your computer and use it in GitHub Desktop.
Save BaReinhard/95602b1bc2406d5506c3159d72feb4e0 to your computer and use it in GitHub Desktop.

First Time users of git on the CLI

You'll want to configure your CLI git client to recognize your email so that you can more easily make push requests to your repo.

git config --global user.name "Your Name Here"
git config --global user.email "your_email@here.com'
// We're probably all aware of the jokes about VIM and how hard it is to exit, so this 
// next step isn't necessary but definitely beneficial
// If there is ever a conflict git will open up your default editor to fix any conflicts
git config --global core.editor nano
// exiting nano is much easier (ctrl+x) and to save is (ctrl+ o + enter)

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or just head straight to the command line:

# Clone your fork to your local machine
git clone https://github.com/YOUR_USER_NAME/YOUR_FORKED_REPO
cd YOUR_FORKED_REPO

Making Changes

Open your favorite editor and begin making new files or changing existing ones. Make sure to save them.

Committing Your Changes

Go back to your terminal, make sure you are in your forked repo directory. Locate any new files and add them to git

git add ./path/to/your/file.whatever
git commit -m "I have created my first commit (make this more informational)"
// Push your changes to your repo
git push

Making your Pull Request

Go back to GitHub in your web browser, locate your forked repo and near the top of the files there is a button says something along the lines of "New Pull Request" Give some description and then click the green "Create Pull Request" button.

That's it you have officially created your first Pull Request for Hacktoberfest, now make 3 more and by the end of October Digital Ocean will reach out to you and ask for information on where to send your FREE t-shirt and stickers

Note:

Any pull request whether it's on a repo that has the Hacktoberfest tag or whether it gets merged or not will count towards the 4. With that in mind, try to make your pull requests useful and not just spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment