Git Commit - A - M "Message": Git Branch - D Branchname Git Branch Branchname
Git Commit - A - M "Message": Git Branch - D Branchname Git Branch Branchname
false
What is the GIT command to see all changes since the last commit?
git status
If you want to see the changes since last commit in a specific file, what
command should you use? git diff filename
What does the command git add. do? Add files to staging area
What does the following command perform? Git reset –- soft HEAD^
What is the GIT command to skip staging and directly commit the changes
directly ? git commit -a -m “message”
What is the GIT command to blow away all changes since last commit?
What is the git command to directly create and move to a new branch?
git checkout -b branchname
What does the command git checkout branchname do? Switches from main
branch to the new branch
When I run git fetch from my local repo it will update my local code? False
What does the GIT command 'git remote prune origin' do? Cleans up all
What is the GIT command to see all the remote branches? Git branch –r
What is a good practice to follow when you want to back up a local branch?
Push to remote repo
What is the command to delete a remote branch in GIT? git push origin :
branchname
Final:
1. If you want to list all the changes and know who made them at what
time , what command should you use? Git who is wrong
2. What is the git command to directly create and move to a new
branch? git checkout -b branchname
3. What is the output of the following code 'git log –- pretty = oneline'?
Display one commit per line with SHA in the beginning
4. What is the command to delete a remote branch in GIT? git push origin :
branchname
5. What is the GIT command to create a branch? Git branch branch
name
6. What is the command to delete a branch in GIT? git branch -d
branchname
7. If you want to see the changes since last commit in a specific file,
what command should you use? Git diff filename
8. After performing several commits, or cloning a repository with an
existing commit history, if you want to look back to see what has
happened, what command will you use? Git log
9. It is a good practice to include log files inside a repository. false
10. What does the command git checkout branchname do?
Switches from main branch to new branch