1. What command creates a git repository in your current directory?
2. How do you add all the files in a subdirectory called ../project/experiment?
3. What shortcut creates and checks out a branch simultaneously?
4. Which file in a git repository specifies intentionally untracked files that git should ignore?
5. What file is used inside of a repository, to list files that should be ignored by git?
6. Which of the following is to copy a remote repository.
7. Which of the following is not a git command
8. What is the main branch of a git repo commonly called?
9. How would one add Remote Repositories?
10. What is the command for displaying the version of git being used?
11. How many remote servers can 1 Git repo pull changes from?
12. What does adding the -m option to git commit do?
13. CSS is also created and maintained by group of people within
14. Is possible to have a global .gitignore file?
15. How do you determine the current state of the project?
16. Who invented Git?
17. What is the command for viewing a list of recent commits?
18. What is the command for switching branches?
19. How do you add all files in current directory to git repository?
20. To update your local repo, which command will you use?
21. Which command shows you the version of your git installation.
22. What is the correct way to add multiple files to the staging area?
23. How do you retrieve changes from a remote repo?
24. To limit the "git diff" comparison to the file foo.txt, use:
25. You want to revert 'notes.txt' to the version in the most recent commit.
26. What feature really makes GIT stand apart from nearly every other SCM
27. Which command will restore the current branch and working copy to the exact state it was at before the most recent commit?
28. How do you undo all changes since your last commit?
29. How can I get the commit ID?
30. How do you stage all changes?
31. Which one of the following commands lists REMOTE branches only?
32. Which command deletes the branch named "stinky" regardless of merge status ?
33. What command undoes all changes since the last commit?
34. How to display a list of configuration parameters?
35. The command "git stash list" should print the following:
36. A staged file is
37. What language is used in Git
38. True or False? Is Git a centralized version control system.
39. Which of the following options enables helpful colorization of command line output?
40. What option suppresses output for git rm?
41. How do you add only certain parts of a file to the index?
42. What's the purpose of 'git bisect' ?
43. What git feature allows you to embed separate repos?
44. How do you add another git repository as a directory of your repository
45. When pushing to a remote server, what is the only type of merge that is accepted by default?
46. Which command will show what revision and author last modified each line of a file?
47. Using which command you can apply a certain commit to the current branch, using the commit's SHA1?
48. What is the default text editor used by git?
49. What is the "git status" option used to output the shortened project status?
50. `git rebase <upstream>` will:
51. Which is the command to remove everything from the stash?
52. A Git repo can consist how many number of heads
53. Which command creates a new commit that undoes the changes in the most recent commit?
54. Which command will move the changes from the last commit into in the stage area?
55. Which command removes file foo.txt from the index but not from the working directory?
56. Which of these commands alters existing commits?
57. What is the option to print a text-base graphic of the commit history when doing 'git log'?
58. How do you set an existing local branch to track a remote branch?
59. git mv is equivalent to what sequence of commands?
60. What is the command to show the un-merged branches (local and/or remote) within the current branch?
61. What is the git diff option to show the diffs of unstaged changes?
62. How do I merge changes made in "development" branch into "master" branch to avoid conflicts?
63. What does the git merge option -s abbreviate?
64. How do you get all submodules to clone after you have cloned a repository?
65. What is the common short-hand for deleting a branch in a remote repository?
66. "git log --since --before" is used to:
67. What is the relationship between the --short and --dry-run options for git commit?
68. What does 'git diff other/master..HEAD' do
69. You stage two files, f1 and f2. Which command unstages only f1?
70. Normally "HEAD" stores the name of a branch, and it is said to be detached when:
71. True or false? "request-pull" a built-in Git command.
72. What is function of git clean -n
73. Which git rebase mode allows you to combine commits by 'squashing'?
74. What happens after you execute the following command? git tag -a
75. Which is the command to remove the latest stash from the stash list?
76. What is the difference between the -c and -C options for git commit?
77. The command "git diff", without any additional arguments, shows...
78. What is the git diff option used to output the shortened diffs for a file foo.txt ?
79. Which command will effectively preview a merge without making any changes?
80. What git commit option is equivalent to using both the -F and -e options?
81. Which command allows you to get the blob of some file whether it is in a repository or not?
82. Which of these two statements makes git use the file from the conflicting commit you are merging from?
83. What does the git commit option -s abbreviate?
84. How is it possible to record a merge from branch "oldBranch" into master without modifying master content?
85. What is the abbreviation for the --dry-run option of git add?
86. Which command obtains the common parent of two commits?
87. What does adding the -a option to git commit do?
88. What is the git diff option to show the diffs of both staged and unstaged changes?
89. which command used to initialise the repository
90. which commande used to commit change
91. What is "head" in git
92. What is the function of "git clone"
93. How do you create a local copy of a remote repository?
94. How do you keep tract of remotes attached to a local repository?
95. Which command is used to create and move to a new branch
96. When you want to unstage a file, what is de right command to do so?
97. How can you bring a new feature in the main branch
98. how do you sync your remote repository with gitHub repository?
99. how do you move from branch to branch
100. Which abreviation is used to "checkout" command?
101. How do you delete files from local repository
102. How do you remove a number of deleted file(s) at one go?
103. Which command could be used to show what will be committed.
104. Which command pushes the commits to the master branch in the origin remote
105. What does "git add ." do?
106. What does the command `git add -A` do ?
107. How to fetch all branches from default remote repository
108. The following command: `git mv -n foo.rb models/foo.rb` would:
109. Stash only one file out of multiple files that have changed with Git ?
110. What does git rerere command do?
111. What is the function of ‘GIT PUSH’ in GIT?
112. How to switch between spaces and tabs in Windows ?
113. Which is the default merge strategy when pulling or merging one branch?
114. Is "request-pull" a built-in Git command?
115. The ' git log -1 --format="%h %an" ' command prints...
116. The following command does what; $ git commit -am "Commit"
117. How you can apply the changes introduced by some existing commits?
118. Which of the following commands will show the file changes before staging?
119. Is it possible to print git log using custom format?
120. Is it possible to define an alias for a git command?
121. What is a hash function is used to identify git commits?
122. How to undo the last commit ?
123. How do you keep track of remotes attached to a local repository?
124. How can you create or switch to a new branch "feature"?
125. Which initializes a new folder?
126. What does git status -s do?
127. How can you check your current git version?
128. What command lets you create a connection between a local and remote repository?
129. Describe what these Git commands do to the commit history: Git reset --hard HEAD~5 Git merge --squash HEAD@{1}
130. Your current project has several branches; master, beta, and push-notifications. You've just finished the notification feature in the push-notification branch, and you want to commit it to beta branch. How can you accomplish this?
131. Which of the following is true you when you use the following command? git add -A
132. What will the following command print to the Terminal? Git remote -v
133. Looking at the following commands, describe what is happening. git checkout feature-user-location; git cherry-pick kj2342134sdf090093f0sdgasdf99sdfo992mmmf9921231
134. What does the following command do to the git repository? git reset --soft HEAD^
135. You find a bug in your project, but can't locate where it was introduced in the commit history. How would you diagnose this problem?
136. Why would the following command be used? Git rebase -i HEAD~10
137. Why would you use a pre-receive hook in your remote repository?
138. What option can you use to apply git configurations across your entire git environment?
139. How could you squash multiple commits together without using git merge --squash?
140. If you cloned an existing git repository, what would happen?
141. How can you display a list of files added or modified in a specific commit?
142. What files is this .gitignore programmed to leave out? #.swift; build/; *.txt; *.metadata;
143. After you make changes to a local repository, you run the following command. What will this do? git commit -a -m "Refactor code base"
144. Where are files stored before they are committed to the local repository?
145. Which statement is true when you use the git add -A command?
146. You find that your project has a tag and branch both named push-notifications, which causes confusion when trying to print out given reference. How can you specify which branch you want to look at?
147. Your team lead needs a list of all commits that will be moved before you perform a rebase. Which command can you use to access that information?
148. What is the operation doing given the Git commands below? Git bisect start git bisect bad 5d41402abc4b2a76b9719d911017c592 git bisect good 69faab6268350295550de7d587bc323d
149. In a situation where you have several commits for a single task, what is the most efficient way to restructure your commit history?
150. Which of the following is true of the git push command?
151. After pushing commits to the remote repository for the first time using the command below, what shorthand command can you use in future? git push -u origin master
152. How would you create a custom shortcut or command across your git environment?
153. What command would let you modify your previous commit?
154. What is the best way to characterize the git commit structure?
155. What change will the following command make to the staging area files? git rm --cached testfile.js
156. After you've successfully merged two branches and committed the changes, what is the next step in keeping your git structure organized?
157. While modifying a file, you're unexpectedly assigned an urgent bug fix on another branch. How can you temporarily save your local work without committing?
158. What command would you use to create a new git repository?
159. While working on a feature branch you try to use "git rerere" to solve a recurring merge conflict but nothing is happening. What could be causing this issue?
160. Which setting determines what pager is used when Git pages output?
161. What does commit object contain?
162. Which option enables inclusion of committer name in custom log format?
163. How many ways are present in Git to integrate changes from one branch into another?
164. Which user should be created first during setting up of SSH?
165. Which command will list tags with the 1.4.2 series?
166. Which of the following is an integration manager?
167. Which Git command begins tracking of a new file?
168. Which of the following is called dumb protocol?
169. Which key press returns a set of suggestions to pick from, when writing a Git command?
170. Which of these terms best describes Git?
171. Which command gets a copy of an existing Git repository?
172. How does Git think of its data?
173. Which option enables inclusion of author name in custom log format?
174. Which version onwards did Git offer reversing a file back to what it looked like when last committed?
175. Which strategy is used by Git for merging two branches?
176. What does refs store?
177. What Language is used in GIT?
178. What is usually the extension of file which has the public key?
179. What is the difference between initializing a normal repo and a bare repo?
180. How many individual commits can a single repository have?
181. What types of tags does Git support?
182. After staging a series of changes to the index, which command could you use to review them prior to a commit?
183. What does the git stash drop command do?
184. What command creates a new branch from the currently checked-out branch?
185. After mistakenly staging a file named myFile to the index, how would you remove it from the index to exclude it from your next commit?
186. What happens if you run this command from your master branch? git checkout -b beta-test
187. How does Git internally manage branches?
188. You want to perform a git reset but cannot recall all of the available options. What command would you use to see a description of them?
189. What is a remote repository?
190. After modifying some existing files in a repository, you decide to discard the changes. What command can you use?
191. After starting to merge a feature branch into your master branch, you encounter a merge conflict and decide you do not want to perform the merge. How can you stop the merge and restore to the pre-merge state?
192. If you have several commits for a single feature, what is the most efficient way to restructure your commit history?
193. Which command correctly creates a lightweight tag?
194. What is the main issue with using git rebase when working with multiple developers?
195. What Git workflow is used by teams that collaborate on a single branch and avoid creating long-lived development branches?
196. Which option on the git log command allows you to limit output to commits made after certain date?
197. How would you delete unreachable objects older than a specified time from your project database?
198. What conflicts can occur when forcing a push after rebasing?
199. How does this command alter the currently checked-out branch? git reset --soft HEAD^
200. What is the difference between Git and SVN?
201. This command is an example of what kind of tag? git tag -a v1.4 -m "ABCD v1.5"
202. What is the difference between a soft reset (git reset --soft) and a hard reset (git reset –hard) ?
203. What information does the git config file store?
204. What is version control?
205. What is the difference between using the git stash and git stash pop commands?
206. Which command can be used to list the branches that have been merged into the currently checked-out branch?
207. How would you configure Git to abort a commit if a smoke test script fails?
208. Which use case is NOT a good candidate for a Git hook?
209. After starting to work on a new feature and creating new files in the working directory related to it, the customer determined the feature was no longer required. What command can be used to remove the untracked files from the working directory ?
210. What information do Git reflogs (reference logs) store?
211. You have just completed rebasing your master branch and need to manually update the remote master, even though there is a merge conflict. How can you accomplish this?
212. What is the difference between git fetch and git pull
213. What command displays the difference between the working tree and the stage/index area, as well as files not tracked by Git?
214. Your current repository has three branches: master, beta, and push-notifications. You have just finished the notification feature and commit the changes to the push-notification branch, and you want to include them in the beta branch. How can you accomplish this?
215. You would like to restore some previously stashed work to a new branch. How can you do that?
216. What is the difference between git branch -d and git branch -D?
217. You stashed three sets of changes but cannot remember the contents of the first stash entry. What command would you use to see the details of the changes in the first of the three stash entries?
218. Which statement is true of the git push command?
219. How would you delete a remote branch in your repository?
220. What is the default setting of git reflog when no subcommands are specified?
221. How does the -p option change the behavior of the git add command
222. After checking out a specific commit, you receive a warning message indicating You are in 'detached HEAD' state. What is Git warning you of?
223. After accidentally deleting a branch in your local repository, how can you recover it?
224. How would you display a histogram showing inserts, deletion, and modifications per file for a specific commit along with its general commit information?
225. What features do repository managers such as GitHub provide beyond Git?
226. What command finds the HEAD of the current branch?
227. When Git Workflows contain a long-running branch, what purpose does the long-running branch serve?
228. What command takes changes from the master branch on the remote repository orgin and merges then to the local checked-out branch?
229. What does the -p option add to the output of the git log command?
230. What is the staging area or index?
231. What command would you use to stage changes to the index strictly for properties files in the current directory?
232. What are untracked files?
233. What command takes changes from the master branch on the remote repository origin and merges them to the local checked-out branch?
234. What type of Git hook could be used to validate that a commit message contains a ticket number?
235. What is the difference between git stash pop and git stash apply?
236. After making some major changes to your code, you are a little nervous about committing. What command would you use to review the commit prior to making it?
237. What statement best describes Git's concept of HEAD?
238. After staging changes to several files, you realize the changes to the confin.properties file are incorrect, and need to be removed from the stage and working directory. What command can you use to remove the staged changes to the file?
239. After a recent release with a stack trace, an issue is create that indicates the problem is with a newly added configuration property named MaxConnections. What command can find all commits that add or remove the string MaxConnections?