Thread (44 messages) flat view 44 messages, 18 authors, 2016-06-15

Re: disallowing push to currently checked-out branch

From: Sergio Callegari <hidden>
Date: 2016-06-15 22:46:12

In my workflows (and let me remark it, in mine, which might well be mine only or
even very stupid), what would be nice would be the possibility of triggering the
following scenario:

- When you push to a repo which is not bare, if you push to a checked out
branch, the branch gets updated, the worktree is not touched, the head becomes
detached, the branch the head was on gets saved somewhere, and when someone
tries asking for status or committing on the repo he gets a message like:

"The branch has been changed behind your shoulders from remote. Your work tree
changes are anyway safe. Head has been detached, your former branch was .... You
can either:
- start a new branch with the changes that are currently in your worktree with
command so and so...
- stash the current status, peek at the new head of your former branch, try
applying your current changes there."

Also it would be nice to be able to store my "standard initial setup" in
.gitinit or something like this, so that whenever I git init I have my own
defaults (which is not the same as having global config info).

...thanks for pre-announcing incompatible changes.

Sergio
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help