NEW
Font size
Worksheetsgit basics
Total questions: 10
Worksheet time: 2mins
How do you start git?
$ git init
$ git clone
$ git start
Show a list of all the commits that have been made.
$ git commits
$ git log
$ git branch
Create a branch called working
$ git branch -d working
$ git pull origin working
$ git checkout -b working
Put everything up on the remote repository.
$ git commit
$ git add
$ git push
How do you determine the current state of the project?
$ git log
$ git state
$ git status
Move all your changes since your last commit to the staging area.
$ git commit .
$ git add .
$ git push .
Switch to the branch "working"
$ git checkout working
$ git checkout -b working
$ git checkout -d working
Delete the branch "working"
$ git branch -b working
$ git branch -d working
$ git branch delete
Store the saved changes in the repository and add a message "first commit".
$ git commit "first commit"
$ git commit -m "first commit"
$ git push "first commit"
Merge the changes that were made in the "working" branch with the master branch.
$ git checkout -b master
$ git merge working
$ git checkout master
$ git merge working
