gitHub
mkdir mypython
第一隻程式:hello.py
# -*- coding: utf-8 -*-
#這是向世界打招呼
print("hello world")
使用github
Step 1: Create a local git repository
cd mypython
git init
Step 2: Add a new file to the repo
mv ~/hello.py .
git status

Step 3: Add a file to the staging environment
git add .
git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: hello.py
Step 4: Create a commit
git commit -m "This is my first python!"
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
git config --global user.email "kawsing@gmail.com"
git config --global user.name "kawsing"
Create a new repository on GitHub

push an existing repository from the command line
git remote add origin https://github.com/kawsing/mypython.git
git push -u origin master


Last updated
Was this helpful?