forked from noisetorch/NoiseTorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.txt
30 lines (29 loc) · 1.69 KB
/
test.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# git init
create a new git in a specific folder. (only once)
(a hidden folder called .git is created, we don't need to go into it)
# git remote add origin https://github.com/dinrepoadress.git ------># git remote add origin https://[USERNAME]:[NEW TOKEN]@github.com/[USERNAME]/[REPO].git
This connects your git with your github (only once)
---------------------------------------------------------------------------------
# git add .
to add new files to index (the dot means all of the files will be added, make sure its a space between add and dot.)
# git commit -m "A sensible message"
To save new files and changed files
# git push -u origin master (git push)
to sync the local git with your github repo
(after it is synced the first time, you can only write git push)
# check your github.com account and see if the contents are uploaded.
DONE
OTHER COMMANDS
---------------------------------------------------------------------------------
# git clone https://github.com/your_repository.git
when we want to bring home a brand new project
# git pull (origin)
when we want to download the latest update (if we have access to the repo)
---------------------------------------------------------------------------
Git access token commands
-------------------------
# git remote add origin https://[USERNAME]:[NEW TOKEN]@github.com/[USERNAME]/[REPO].git
how to generate token : https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token
or if you have set origin before
# git remote set-url origin https://[USERNAME]:[NEW TOKEN]@github.com/[USERNAME]/[REPO].git
your_repository save