question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to push a commit rather than a branch?

See original GitHub issue

My current git workflow is to work primarily with commits (rather than branches). This works beautifully in magit proper, but I’ve been having some issues in edamagit. The main thing that’s causing issues is that I’m not sure how to push a commit to a remote.

Is it possible to push a commit rather than a branch to a remote in edamagit? I know you can push a branch to a remote, but I can’t seem to figure out how to do this when working directly with a commit. I’m looking for the equivalent of:

$ git push $REMOTE $COMMIT_SHA:refs/heads/$REMOTE_BRANCH_NAME

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kaholecommented, Feb 9, 2021

This is increasingly becoming an issue for me as well. I don’t maintain a functioning emacs config anymore, and that stuff rots. So opening emacs to try a quick thing in magit isn’t always easy. Maybe I should keep a vanilla + magit config around.

0reactions
joneshf-cncommented, Feb 18, 2021

This works! Thanks again1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Push commits to another branch - git - Stack Overflow
@orad: No. The first part is actually just an identifier for a local commit; it doesn't even need to be a branch. –...
Read more >
How To Push Git Branch To Remote - devconnected
Learn how you can push a Git branch to remote using the git push command and specify the branch to be pushed to...
Read more >
Pushing commits to a remote repository - GitHub Docs
In this article. Use git push to push commits made on your local branch to a remote repository.
Read more >
How to push new Git branches to remote repos on GitHub or ...
Perform a git push with the –set-upstream option to set the remote repo for the new branch; Continue to perform Git commits locally...
Read more >
Git Push | Atlassian Git Tutorial
Pushing is how you transfer commits from your local repository to a remote repo. It's the counterpart to git fetch , but whereas...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found