Branches
To get branch files differences use grep or --name-status
git diff master..dev | grep "^diff"
diff --git a/config/_database.php b/config/_database.php
diff --git a/config/database.php b/config/database.php
diff --git a/controllers/reports.php b/controllers/reports.php
git diff master..dev --name-status
D config/_database.php
M config/database.php
M controllers/reports.php
Questions and answers
Branch files difference
- a) git diff master..dev | grep "files"
- b) git diff master..dev --name-status
Merge one file between branches
- a) git diff master..dev file1
- b) git checkout dev file1