git-machete icon indicating copy to clipboard operation
git-machete copied to clipboard

`github create-pr`: compare with remote instead of local

Open mkondratek opened this issue 3 years ago • 1 comments

Hi 👋

Imagine the following:

  1. A single branch in the repository - master.
  2. I forgot to create a new branch or simply want to do it later.
  3. Commit or two to master (now it's ahead of origin).
  4. NOW sliding in a new branch - feature (untracked).
  5. Push feature.
  6. Execute git machete github create-pr.
  7. Outptut: All commits in feature branch are already included in master branch. Cannot create pull request.

The above result is ofc true for local/master. However, esp in the scope of GitHub pr for me, it is rather clear that it is remote/master that I am interested in.

Q: Would it make sens to change the git machete github open-pr behavior to compare with remote branch instead?

So my scenario would end cerating PR freom remote feature to remote master.

mkondratek avatar Sep 21 '22 08:09 mkondratek

+1, makes sense at least to refine the warning to mention that all commits from feature branch are in local master but not in origin/master + some suggested action for the user to tidy up the mess

PawelLipski avatar Sep 21 '22 08:09 PawelLipski