-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitcommands
More file actions
47 lines (26 loc) · 871 Bytes
/
gitcommands
File metadata and controls
47 lines (26 loc) · 871 Bytes
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
************************************
* Helpful GIT Commands *
************************************
Creating a repository from scratch
----------------------------------
# Step 1: Create the test project
# Step 2: Initialise the repository
git init
# Step 3: Write Code
# Step 4: Add the files
git add .
# Step 5: Commit the repository
git commit -m "first commit"
# Step 6: Create the main branch
git branch -M main
# Step 7: Log into GitHub and create the remote repository
# Step 8: Create the main branch
git branch -M main
Step 9: Remove add the branch
git remote add origin https://github.com/steinermite/learning.git
Step 10: Push the repository
git push -u origin main
# Push an existing repository from the command line
git remote add origin https://github.com/steinermite/learning.git
git branch -M main
git push -u origin main