-
Notifications
You must be signed in to change notification settings - Fork 0
/
worksheet.txt
26 lines (14 loc) · 1.17 KB
/
worksheet.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
Q: What are the 3 commands to transfer something from your local codebase to github
A: git add, git commit, git push
Q: What does git clone do?
A: Creates a local repository to work with
Q: Git status?
A: Provides information about the files staged (or not staged) to commit
Q: What does Your branch is up to date with 'origin/master' tell you?
A: Your branch is up to date with the last time you pulled from Github
Q: You’ve made a change to a file in GitHub, the one on the browser, and now you run git status on the terminal. It still says up to date despite the change. What command do you need to enter first?
A: git pull
Q: You’ve just ran the rm command and deleted an important file and all your code is deleted not including the local repository. You’ve only ran git add and git commit before the rogue command. Is your code saved?
A: If the file existed before the last push, changed are saved up until that point. All your work after that is gone.
Q: You’re computer crashes and all your code is deleted, including the local repository. You’ve only ran git add and git commit. Is your code saved?
A: All of your work on the local machine that wasn't pushed is lost.