in Education by
I want to merge two branches that have been separated for a while and wanted to know which files have been modified. Came across this link: http://linux.yyz.us/git-howto.html which was quite useful. The tools to compare branches I've come across are: git diff master..branch git log master..branch git shortlog master..branch Was wondering if there's something like "git status master..branch" to only see those files that are different between the two branches. Without creating a new tool, I think this is the closest you can get to do that now (which of course will show repeats if a file was modified more than once): git diff master..branch | grep "^diff" Was wondering if there's something I missed... Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Use the following compare the current branch against master branch: $ git diff --name-status master Use the following to compare any two branches: $ git diff --name-status BranchA..BranchB For more information please go through the following tutorial to get more info about git:

Related questions

0 votes
    I cloned a Git repository, which contains about five branches. However, when I do git branch I only see one of ... staging * etc... Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I created a local branch that I want to 'push' upstream. There is a similar question here on Stack ... the upstream repository? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I staged a few changes to be committed; how can I see the diff of all files which are staged for the next ... an alias for, right? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I staged a few changes to be committed; how can I see the diff of all files which are staged for the next ... an alias for, right? Select the correct answer from above options...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    How do you delete untracked local files from your current working tree? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    I create a new branch in Git: git branch my_branch push it: git push origin my_branch Now say someone made ... the default behavior? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I don't want to rename a remote branch, as described in the Rename master branch for both local and remote ... and remote branch name Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    I started some work on a new feature and after coding for a bit, I decided this feature should be on its ... on the new feature. Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    How will you find out what all files have been changed in a particular Git commit?...
asked Nov 4, 2020 in Technology by JackTerrance
0 votes
    How do you find a list of files that have changed in a particular commit?...
asked Nov 2, 2020 in Technology by JackTerrance
0 votes
    How do you find a list of files that have been changed in a particular commit?...
asked Oct 4, 2020 in Technology by Editorial Staff
0 votes
    I want to take all the changes I made in the staging to my working directory. What command should I use to perform this ... B. git reset HEAD C. git reset TAIL D. git change...
asked Dec 23, 2022 in Technology by JackTerrance
0 votes
    What does the command git reset –hard HEAD ~3 do? A. Merges the last 3 commits to the master B. Discards ... nothing D. Resets the head to 3 commits before the current commit...
asked Dec 23, 2022 in Technology by JackTerrance
0 votes
    What is the Git command to view the last three commits in a line? A. git last 3 commits B. git log -–oneline -3 C. git show log -3 D. git log...
asked Dec 23, 2022 in Technology by JackTerrance
0 votes
    What is the significance of using –index in the git stash pop – – index command? A. To commit the ... To index the files staged D. To pull the staged changes...
asked Dec 23, 2022 in Technology by JackTerrance
...