-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGitHub_workflow_commands.txt
More file actions
58 lines (40 loc) · 2.35 KB
/
GitHub_workflow_commands.txt
File metadata and controls
58 lines (40 loc) · 2.35 KB
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
USEFUL COMMAND:
git branch
To tells you a list of branches, the one with '*' is the one you are on.
git status
To see changes made, red = not in stage, green = in staging. Red means it's not ready to be added(upload/push) to github, green means it's ready to be added(upload/push). to github.
git log --graph --decorate -- oneline --all
To see a log of your history.
WORKFLOW:
git checkout master
Moves you to the Master branch.
git pull origin master
Make sure you are on the master branch when you do this command.
This updates your local machine with the newer files in the repository on github.
git branch
To know what branch you want to be on.
git checkout [branch name]
To be at the right branch that you want to modify your files into. Tag on a '-b' option to create a new branch and then move to it.
git pull origin [current branch name]
Updates your branch as well.
git add [your files]
To make your files ready to be push to github (to stages the file, it will make the file from red to green when you type 'git status').
These changes are made in the branch you are on.
git status
To see what files are ready and what are not.
git commit -m "Your messages/comments for this commit"
This will record the changes on your local repository(your laptop for example).
Records the change on the branch you are on.
git push [alias] [branch name]
alias is what repository you want to upload to on github, it will be 'origin', origin is the default alias to the SpeechRec repository on github, this is from when we clone the repository into our local computer
branch name is the branch that you want to upload to github.
This will record the changes and update files in a remote repository(github's server).
ONCE YOU ARE SURE THAT YOUR CODE WORKS 100%, TIME TO MERGE TO THE Master Branch locally and then push it onto Github:
git branch
git checkout master
Moves to the branch you will be uploading/pushing into.
git merge --no-ff [name of the branch you want to merge with master]
Must add --no-ff option to the command, Robert said something about it being just moving some pointers around and not really what we want.
git push origin master
Origin is the alias to our SpeechRec repository on github
Master is the branch on your laptop that you want to push into Origin(SpeechRec)'s master branch