Skip to content

Instantly share code, notes, and snippets.

@Anool
Last active July 22, 2022 15:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Anool/a555032a61b550797c97231a676fb9e7 to your computer and use it in GitHub Desktop.
Save Anool/a555032a61b550797c97231a676fb9e7 to your computer and use it in GitHub Desktop.
Super simple guide to GIT

This is a super simple guide to using GIT, creating a Git repo, adding files to the repo, and a few other very basic commands.

  1. Log in to GitHub. If you don't already have an account, then sign up.
  2. Choose a username that is easy to remember and share.
  3. In the REPOSITORIES tab, Select the green NEW button.
  4. Choose a name for your repository.
  5. Add a description. Keep it short and useful.
  6. Select the PUBLIC radio button
  7. In the "Initialize this repository with:" section select the "Add a README file" option.
  8. Choose a suitable license for your project. Usually, GNU GPL V3 works.
  9. Select the green CREATE REPOSITORY button
  10. Locate the green CODE button (pull down), choose the HTTPS tab and copy the link to your git repo.
  11. Instructions from here on depend on your OS and the type of GIT client you use (GUI,command line etc)
  12. I use Linux (Ubuntu) and command line.
  13. You can find similar instructions for your OS.
  14. On your local machine, open a terminal.
  15. Navigate to the folder where you want to have local copy of your GIT repo.
  16. Do the following command
  17. You now have a local copy of your repo
  18. Add project files (copy paste) to the local git folder
  19. In a terminal, in your local git folder,
    • git add --all // adds all the files
    • git commit -a -m "add commit comment" // creates snapshot of your local repo
    • git push // uploads local changes to remote repo
  20. At this point, your local repo and remote repo are synchronised
  21. If you have set up a team, and have other members who wish to contribute then they can follow the same instructions as above.
  22. If someone else makes changes, you can update your local repo by doing
    • git pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment