-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommand
63 lines (39 loc) · 2.02 KB
/
Command
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
54
55
56
57
58
59
60
61
62
==== Upload File to Github On Linux/Mac Os ====
1. git init // for initialize all file on dictionary
2. git add . // add all file on dictionary
3. git commit -m "update" // create label name file for initialize new update
4. git branch -M main // create name branch optional ["main or master"]
5. git remote add origin "your url repository" // connect to your repository
6. git push -u origin main // upload file to your repository "main" is name your branch
==== Upload & Rewrite File For New Update ====
( if you have already exist remote your repository )
1. git push -f origin main // upload and rewrite file to your repository. ["main" is name your branch]
(if you want change all file for update )
1. rm -rf .git // remove your initialize folder github in your dictionary
2. git init // for initialize all file on dictionary
3. git add . // add all file on dictionary
4. git commit -m "update" // create label name file for initialize new update
5. git branch -M main // create name branch optional ["main or master"]
6. git remote add origin "your url repository" // connect to your repository
7. git push -f origin main // upload and rewrite file to your repository. ["main" is name your branch]
=== Delete Local Branch ====
git branch -d "Your Branch Name"
=== Delete remote branch ====
git push "remote name" : "Your branch name"
Example : git push origin : Ball-random
=====================================
Here are some ways to work in your own folder on Github repository:
1. Switch Branch
git checkout branch_name
2. Update Files in 1 Folder
Update files on the remote repo so the contents of the files are same as in your local repo.
git fetch remote_repo branch_name
git checkout remote_repo/branch_name folder_name
3. Push 1 Folder Immediately
You can push folder contains of files or/and folder with command:
git add ./folder_name
git commit -m “your_commit_message_text”
git push remote_repo branch_name
=====================================
========== Thank you===========
I hope will help you,