git switch and restore user interface

2019-08-19 Thread Ed Avis
I think it would be helpful for git switch to print a reminder of the old and new branches. Hi, a couple of suggestions for these experimental new commands. Git switch should print the branch you are leaving: % git switch foo You were previously on branch bar (abcdef). You are now on branch fo

Re: Git stash behavior

2015-08-17 Thread Ed Avis
You may want to see this recent thread about a similar feature: <http://thread.gmane.org/gmane.comp.version-control.git/275607> -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordo

Re: Feature: git stash pop --always-drop

2015-08-10 Thread Ed Avis
it would be easy to drop that particular stash afterwards. Running one too many or one too few 'git stash drop' commands would no longer cause problems. Printing the name of the stash would, for me, largely remove the need for an --always-drop option to git stash, which is what I at firs

Re: Feature: git stash pop --always-drop

2015-08-10 Thread Ed Avis
like to see is a kind of atomic stash apply, >I think that may be a bit harder, as the merge machinery would have to >know how to be atomic. If git merge-recursive had a --dry-run flag that might take care of it. -- Ed Avis -- To unsubscribe from this list: send the line "unsubscrib

Re: Feature: git stash pop --always-drop

2015-08-10 Thread Ed Avis
where either the whole change can be applied to the working tree without conflicts, or nothing happens. -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Feature: git stash pop --always-drop

2015-08-10 Thread Ed Avis
An alternative would be for git stash to always print the name of the stash it is applying. Then you can drop it afterwards by name and be sure you got the right one. Printing the name of the stash sounds like a reasonable bit of chatter to add anyway, do you agree? -- Ed Avis -- To

Feature: git stash pop --always-drop

2015-08-10 Thread Ed Avis
or such an --always-drop flag be accepted? -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Running pre-commit hook

2015-07-31 Thread Ed Avis
nt environments and editors that interface to git.) Is there a way to do a dry run commit that also runs some of the hooks? -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at htt

Re: Log messages beginning # and git rebase -i

2015-07-29 Thread Ed Avis
Thank you for looking into this. -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Log messages beginning # and git rebase -i

2015-07-28 Thread Ed Avis
editing of the log message will not work. Please set commentChar to some other value (such as 'auto') in your git configuration to be able to rebase interactively. The current behaviour is a bit of a trap for the unwary, and anyway it leaves no way to specify keeping

Re: Log messages beginning # and git rebase -i

2015-07-28 Thread Ed Avis
- so if commentChar is set to * for example, then log lines beginning with * should get an extra space prepended in git rebase --interactive so that they don't get lost. -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord..

Log messages beginning # and git rebase -i

2015-07-27 Thread Ed Avis
suggest that git rebase should add an extra space at the start of existing log message lines which begin with #. That is a bit of a kludge but it is better than losing them because they got mixed up with comments. -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe gi

Re: [PATCH] git-checkout.txt: Document "git checkout " better

2015-06-11 Thread Ed Avis
I guess 'replace' would be a better word than 'restore' for the current behaviour. -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] git-checkout.txt: Document

2015-06-11 Thread Ed Avis
h: git stash apply checkout_backup_abcde Then there would be no need for agonizing over the documentation to make it clear that 'git checkout PATH' can be a dangerous operation, because it would no longer be dangerous. -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] git-checkout.txt: Document "git checkout " better

2015-06-10 Thread Ed Avis
suitable verb because of the existing git-revert, then I suggest that 'overwrite' or 'replace' might better convey the idea of what the command does. -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Suggestion: make git checkout safer

2015-06-05 Thread Ed Avis
checkout .' is not a safe way to restore missing files in the working tree, what is the recommended way to do that? Thanks all for your comments and guidance. -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Suggestion: make git checkout safer

2015-06-05 Thread Ed Avis
Torsten Bögershausen web.de> writes: >Do you think you can write a patch to improve the documentation ? Here is my attempt, but it is only a starting point. diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index d263a56..ee25354 100644 --- a/Documentation/git-checkou

Re: Suggestion: make git checkout safer

2015-06-04 Thread Ed Avis
Ed Avis waniasset.com> writes: >Julio H. asked how I had learned to run 'git checkout .'. Sorry it was Torsten B. who asked that. But yes, I think it was just word of mouth. -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the b

Re: Suggestion: make git checkout safer

2015-06-04 Thread Ed Avis
When switching branches... this is used to throw away local changes. To the casual reader, following 'the exception proves the rule', it appears that local changes are not thrown away except in this case. -- Ed Avis -- To unsubscribe from this list: send the line "

Re: Suggestion: make git checkout safer

2015-06-04 Thread Ed Avis
metimes when everything is a real mess it is more straighforward to reach for 'rm' - or indeed for the delete option in your IDE or file browser. -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Suggestion: make git checkout safer

2015-06-03 Thread Ed Avis
e?'. And the time when it would be useful - after some bungled operation that lost data - is just the time when the user is already confused and adding another semi-hidden stash of objects to the mix would befuddle them further. If there is to be a backup made of local changes that get los

Re: Suggestion: make git checkout safer

2015-06-03 Thread Ed Avis
foo You may want to commit or stash these changes, or delete the files if you don't want them. Use 'git checkout --force' to proceed, throwing away local changes. Aborting If the checkout operation would only involve creating some files on disk which aren't currently there

Suggestion: make git checkout safer

2015-06-03 Thread Ed Avis
7;). Only if --force is given should working tree differences be thrown away. % git --version git version 2.4.0 -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

'git show' with multiple revisions

2015-04-28 Thread Ed Avis
s what I really want is some kind of 'git cat'. Or is there another more appropriate tool? Thanks, -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html