clone the Git and edit it
-
Clone the git
cd + directory: Change directory
git clone + copied thing
ls: look at the files in the folder -
Edit the file
touch hello.py: create a new file
vi hello.py: edit the file
:i: insert, start editing the file, write codes
print(“Hello World”)
esc: finish edit
:wq : save and quit
:q : quit
cat hello.py: see the code in the file -
Check + push
git status: check the list of files modified
git add hello.py: add the file
git add . : add all
git restore --staged hello.py: remove the file from the folder
git commit -m"Added hello.py file"
git push: push the updates to online github
(or: git push -u origin master)