Skip to content

Commit

Permalink
Make the commit messages more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasEh committed Oct 6, 2024
1 parent 46d5a67 commit 6a2582d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/git-cp
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ else

# Move the original file to the new destination, in this branch
git mv "${CURRENT_FILENAME}" "${DESTINATION_FILENAME}"
git commit -nm "Copy $CURRENT_FILENAME into $DESTINATION_FILENAME"
git commit -nm "--Duplicate $CURRENT_FILENAME history into $DESTINATION_FILENAME"

# Restore the original file to keep it in the history
git checkout HEAD~ "${CURRENT_FILENAME}"
git commit -nm "Restore $CURRENT_FILENAME"
git commit -nm "--Restore $CURRENT_FILENAME"

# Switch to the original branch and merge this back in.
git checkout -
git merge --no-ff "$BRANCH_NAME" -m "Copying $CURRENT_FILENAME into $DESTINATION_FILENAME"
git merge --no-ff "$BRANCH_NAME" -m "Copy $CURRENT_FILENAME into $DESTINATION_FILENAME"

# We're now done with the branch, so delete it.
# We shouldn't need -D here, as we've already merged it back in.
Expand Down

0 comments on commit 6a2582d

Please sign in to comment.