Hi,

My goal is to show you how to create a github account to share your python code when you post a wsq on your blog.

  1. Go on the website https://github.com and create an account.You have to choose a funny nickname. This one is really important because your github URL and github adress depend on.
  2. Create a new repository. For example « TC101 »
  3. Create a local repository on your computer:
  • Create a file on your computer , be careful you have to remember the path
  • Then, execute the command git clone « copy/past the link on github »
  • After, execute the both git config command. Be careful every people could see your email address if you enter your real 😉

4. Post your first code on github , execute these commands in order:

  • git status -> untracked file
  • git diff « pythonfile.py » -> see the modifications
  • git add -> staged file
  • git commit -m « your comment »
  • git pull (not really useful here because it’s your own work) -> conflicts?
  • git push -> send to github , then check the online interface

Notes: Be careful !! You have to move your pythonfile.py in the local repository before executing these last steps. (use cp command)

5. Copy/Paste the URL of your github code on your blog.

Have a good day !

CC BY 4.0 MASTERY 3 & 4 by aureliemartinette is licensed under a Creative Commons Attribution 4.0 International License.