salcode / salcode-git

My Git configuration.
MIT License
3 stars 1 forks source link

Show previous branch name when using - #35

Closed salcode closed 1 month ago

salcode commented 4 months ago

Display the previous branch name instead of @{-1} when using "git is-up-to-date-with -" to check if the current branch is up to date with the previous branch

Before this Change

$ git is-up-to-date-with - Yes, this branch is up to date with @{-1}

After this Change

$ git is-up-to-date-with - Yes, this branch is up to date with main

Resolves #34

salcode commented 4 months ago

How to Test

  1. Create a branch off of your current branch
  2. Run git is-up-to-date-with -

Before this PR

$ git is-up-to-date-with -
Yes, this branch is up to date with @{-1}

After this PR

$ git is-up-to-date-with -
Yes, this branch is up to date with main

(where main is the name of your original branch)