Skip to content

Instantly share code, notes, and snippets.

View smw7156's full-sized avatar

shadman smw7156

View GitHub Profile
@smw7156
smw7156 / git_alias_window.md
Created November 27, 2024 11:53
Aliases for git command in windows

I am using powershell in windows 11 (I don't like windows, but my company uses only windows machine) so, there is a file that is loaded whenever you start your powershell program in windows. that is $PROFILE

This file might not be present if you have newly installed windows in your machine, but the path is already defined.

Type echo $PROFILE and it will print the path.

You can open the path in any editor of your choice, and add these lines in that file for creating the alias

Note: these are general alias that can be run from any path in powershell. you can obviously create aliases other than git

@smw7156
smw7156 / Shadman_git_doc.md
Last active October 24, 2024 07:34
Here are some of the command I mostly use,

Git handbook

Difference between commit and files

  • git diff --name-only 4242069 b5011b8 -> only for file changed between two commits
  • git diff b5011b8:StanceBeam/app/src/main/java/stancebeam/quicklogi/com/cricketApp/MainActivity.java 4242069:StanceBeam/app/src/main/java/stancebeam/quicklogi/com/cricketApp/MainActivity.java difference between two file from two commits(older commit should be placed first)