-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path001.CreateNewRepos_gitInit_gitPush.txt
54 lines (45 loc) · 1.46 KB
/
001.CreateNewRepos_gitInit_gitPush.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# 1. PUSH FILE TO GIT
git add file_name
git commit -m "message" #This is the buffer for all changes
git push -u origin(local_name_of_repos) master(branch_name)
# 2. CREATE A NEW REPOS
create a new repos on the git website
git remote add origin(local_name_of_repos) web_address_of_repos
git remove -v #This is for status checking of remote
# 3. Gitify a folder
create a folder & navigate (cd) with the terminal
git init
# 4. Other useful commands
git status
touch a_new_script
history > file_name #This is for saving the bash history to a file
pwd
ls -a #Find hidden .git files
498 jupyter notebook
499 cd /Users/heyiran/Desktop/Crick/
500 mkdir Git/
501 cd Git/
502 touch my_first_file.py
503 pwd
504 git init #initialise git
505 ls
506 ls -a #to find the hidden git folder
507 git status #check git status
508 git add my_first_file.py #add a file
509 git status
510 git commit #commit a file
511 git status
512 ls
514 git log #see history of git
515 ls .git/
516 git remote
517 git remote add origin https://github.com/yiran25/my_first_repos.git #set up for git uploading
519 git push -u origin master #upload to git
520 nano my_first_file.py #edit file
521 git status
522 git add my_first_file.py
523 git commit -m "Add comment" #add comments to git uploading
524 git push
525 history
526 history > firstgit_notes.txt
528 history | grep git > firstgit_notes_git.txt