This repository has been archived by the owner on Feb 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
how-to-github.txt
68 lines (43 loc) · 1.78 KB
/
how-to-github.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
-- How to use github --
Firstly install git:
Windows: https://www.stanleyulili.com/git/how-to-install-git-bash-on-windows/
Linux: (Comes built in)
Mac: https://www.atlassian.com/git/tutorials/install-git
Configure git (in git bash / mac terminal):
$ git config --global user.name "YourGithubUserName"
$ git config --global user.email "YouGithublinkedEmail"
use your name and email
Clone (Download) the folder from github:
$ git clone https://github.com/SuchithSridhar/COVIDHackers.git
----- This is the end of the first time set up ----
Access a perticular branch to start code
$ cd COVIDHackers
(you can use <Tab> to autocomplete)
$ git checkout TestBranch
(The name of the branch depends on which project you have been assigned)
$ git checkout -b AddingButtonFeature-Suchith
(Here you are creating a new branch to add your feature)
--- Now in your computer if you create files in this "COVIDHackers folder its only added to your branch" ---
lets create a test file
$ echo "Testing the git commands" > "testfile.txt"
(Now this file has been added to your branch)
(Once you done coding your things)
$ git status
(make sure you are on your branch, if not then do git checkout NameOfBranch)
(Never do anything to master branch)
$ git stash
$ git pull
$ git stash apply
$ git add .
$ git commit -m "description of the changes you made"
$ git push --set-upstream origin AddingButtonFeature-Suchith
(Once you are done with everything you want to add, inform me, i'll merege your feature with the main app)
IMPORTANT: Never do anything in master branch.
--- Lets try doing a test project --
I've created a branch called TestApp
so change to that branch then make your feature branch
then add a new file
add .
then commit the files
then push
and then inform me