Skip to content

Instantly share code, notes, and snippets.

View ironpython2001's full-sized avatar

Sunil P ironpython2001

  • OSI Digital
  • Hyderabad
View GitHub Profile
@ironpython2001
ironpython2001 / gist:b727c57c30417a44ec3580851b492581
Created May 18, 2023 07:10
git change branch or checkout branch
git checkout <branch-name>
@ironpython2001
ironpython2001 / gist:3aa6dcdbf27611a84925e1e4f93104b8
Created May 18, 2023 07:12
git show uncommitted changes in current branch
https://stackoverflow.com/questions/35978550/how-to-show-uncommitted-changes-in-git-and-some-git-diffs-in-detail
git diff
https://stackoverflow.com/questions/8554776/how-to-filter-git-diff-based-on-file-extensions
git diff -- '***.py'
@ironpython2001
ironpython2001 / gist:f27f3bcbfcbc404f76812e26c47506fa
Last active May 18, 2023 08:26
git what was changed in a branch
git whatchanged --name-only --pretty="" *.xaml *.cs
or
git whatchanged --oneline --name-only
https://stackoverflow.com/questions/25289469/how-to-find-list-of-unique-files-that-have-changed
https://stackoverflow.com/questions/10641361/get-all-files-that-have-been-modified-in-git-branch
find list of unique files that changed
@ironpython2001
ironpython2001 / gist:fb15d377fef1adf88dac8988ba0ae64b
Last active May 18, 2023 08:45
git diff of a file in different branches
git diff two files in different branches
D:\pathofrepo>git diff origin/branch1 origin/branch2 -- pathtofile/filename.cs
if you want to ignore white spaces
git diff -b origin/branch1 origin/branch2 -- pathtofile/filename.cs
reference:
https://stackoverflow.com/questions/4350678/git-diff-w-ignore-whitespace-only-at-start-end-of-lines