-
In your own words, why might it be bad practice to push directly to the master branch of a repository? What might be a better practice instead? What are some ways that projects enforce these practices?
-
What are the commands to create a new branch, switch to that branch, and commit a set of staged changes? Are there any shorthands for these commands?
-
Suppose that we have two branches
branch1
andbranch2
andgit log
tells us thatHEAD
is pointing tobranch2
. What are the command[s] to mergebranch2
intobranch1
? -
Suppose we’re working on
branch2
, and we’ve opened a merge request to merge into master on GitLab. Someone else makes changes to master which causes conflicts with our changes. How might we resolve these changes on Gitlab and then preview them locally? -
Suppose that we knew our project was in a working state when we made a commit with the message:
Commit 1
. How might we temporarily put our local repository in the same state as it was when we made that commit? How might we identify what changes we’ve made since then?