Re: [git-users] Re: how to change message of old commit

2012-07-23 Thread Rustom Mody
On Mon, Jul 23, 2012 at 11:54 AM, Thomas Ferris Nicolaisen  wrote:

>
> Could you point me to that 'git-bash thing'? -- Looks very useful
>>
>
> Note that it only works for zsh (z-shell) and bash, so you'll need to run
> either Linux, Mac, or Windows with Cygwin (or Git Bash).
>
> In the above shells, you have a variable called the PS1 which value
> appears in front of your command line prompt (typically username@machine,
> timestamp and stuff like that). There's a very popular script called
> git-prompt.sh that adds useful Git context to the PS1. It's available here:
>
> https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh
>
>
Thanks. Neat!

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to change message of old commit

2012-07-22 Thread Thomas Ferris Nicolaisen


> Could you point me to that 'git-bash thing'? -- Looks very useful 
>

Note that it only works for zsh (z-shell) and bash, so you'll need to run 
either Linux, Mac, or Windows with Cygwin (or Git Bash).

In the above shells, you have a variable called the PS1 which value appears 
in front of your command line prompt (typically username@machine, timestamp 
and stuff like that). There's a very popular script called git-prompt.sh 
that adds useful Git context to the PS1. It's available here:

https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh 

How to setup is described in the comments of that file.

You can find my whole personal setup here: 
http://blog.tfnico.com/2012/03/my-terminalshell.html (although I use an older 
copy of 
git-prompt.sh
).
 

> Yes this is the kind of thing I was asking about -- Say I do a pull and 
> get stuck on a conflict. Is there some easy way to find out what state (or 
> as you called it 'mode') git is in? Note that I may want to know this at a 
> different point of time from when the pull message is still in front of me 
> in the terminal.


Git keeps this state inside the .git folder somehow. I don't know them all, 
but I just tested with a merge conflict, and saw these files appeared 
inside the .git repo:


   - MERGE_HEAD
   - MERGE_MODE
   - MERGE_MSG
   

There probably are corresponding files for the other modes. 

Oh, and for Windows/Powershell there's an alternative git-prompt thing: 
posh-git , which I touch on in this 
post: http://blog.tfnico.com/2012/04/my-git-setup-on-windows.html

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/-EAER4YId7sJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to change message of old commit

2012-07-22 Thread Rustom Mody
On Sun, Jul 22, 2012 at 2:18 AM, Thomas Ferris Nicolaisen
wrote:

> Well I can kinda see the parallel to vim when it comes to learning curve.
> Git certainly has some areas where the ui can be improved, and the good
> thing is that they are continuously making small steps to improve it (while
> vim is pretty frozen by now).
>

Thanks for your kind words Thomas!


>
> There are a few "modes" I often use. Git doesn't really call them modes,
> but I think of them like that as they are displayed in my console prompt
> (I've got some git-bash thing that shows off stuff like this in my ps1).
>
>
Could you point me to that 'git-bash thing'? -- Looks very useful


> # Detached head: not on a branch. Typically checked out an old commit.
> # am mode: in the middle of applying patches using git am
> # rebase: as discussed. Can also occur during git pull --rebase
> # conflict: when conflicts were found during merge
>

Yes this is the kind of thing I was asking about -- Say I do a pull and get
stuck on a conflict. Is there some easy way to find out what state (or as
you called it 'mode') git is in? Note that I may want to know this at a
different point of time from when the pull message is still in front of me
in the terminal.

Konstantin sorry to have caused offense. No intention of being sarcastic.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to change message of old commit

2012-07-21 Thread Thomas Ferris Nicolaisen
Well I can kinda see the parallel to vim when it comes to learning curve. Git 
certainly has some areas where the ui can be improved, and the good thing is 
that they are continuously making small steps to improve it (while vim is 
pretty frozen by now).

There are a few "modes" I often use. Git doesn't really call them modes, but I 
think of them like that as they are displayed in my console prompt (I've got 
some git-bash thing that shows off stuff like this in my ps1).

# Detached head: not on a branch. Typically checked out an old commit. 
# am mode: in the middle of applying patches using git am 
# rebase: as discussed. Can also occur during git pull --rebase
# conflict: when conflicts were found during merge

(On a mobile device here so have to keep it short)

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/Y4GfGrl01eYJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to change message of old commit

2012-07-21 Thread Konstantin Khomoutov
On Sat, Jul 21, 2012 at 07:43:31AM +0530, Rustom Mody wrote:

> > I suspect that you are in "rebase mode". That is, you're in the middle of
> > rewriting som history, and Git is waiting for you to type things like "git
> > rebase --abort" or "git rebase --continue". If you just want to get out of
> > this mode, I reckon also a "git reset --hard master" should get you back to
> > how you left things in master branch.
> >
> >
> It is said about vi: The text editor with two modes... one that beeps and
> one that corrupts your file
> 
> Currently I have the same expertise at git that I had when first learning
> vi (many years ago)
> 
> Can I find a summary of 'git modes' somewhere?
Please stop inventing bullshit.  It's natural, that when you're starting
an interactive (!) rebase and then tell git you want to edit a commit,
Git has to be told when you're done with your edits.  And when Git
stops carrying rebase steps at the commit you told it you want to edit,
it tells you in clear words what to do when you're done:

foo% git rebase -i HEAD~3
Stopped at 183fe3c... 3rd commit
You can amend the commit now, with

git commit --amend

Once you are satisfied with your changes, run

git rebase --continue

You did not pay attention to this (quite wordy) message and are now
trying to make up sarcastic jokes.  Please don't.  Start from reading
`git rebase` manual, in particular the --abort option to `git rebase`.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to change message of old commit

2012-07-20 Thread Rustom Mody
On Sat, Jul 21, 2012 at 2:25 AM, Thomas Ferris Nicolaisen
wrote:

> I suspect that you are in "rebase mode". That is, you're in the middle of
> rewriting som history, and Git is waiting for you to type things like "git
> rebase --abort" or "git rebase --continue". If you just want to get out of
> this mode, I reckon also a "git reset --hard master" should get you back to
> how you left things in master branch.
>
>
It is said about vi: The text editor with two modes... one that beeps and
one that corrupts your file

Currently I have the same expertise at git that I had when first learning
vi (many years ago)

Can I find a summary of 'git modes' somewhere?

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: how to change message of old commit

2012-07-20 Thread Thomas Ferris Nicolaisen


On Friday, July 20, 2012 9:16:54 PM UTC+2, git-guy wrote:
>
> hi guys how i can change old message in some old commits.
>
> i tried follow one tutorial but totaly wrong
>
> he say:
>
> *git rebase -i :*
> *
> *
> *chosse edit in commit wants change*
> *
> *
> *after: * *git commit –amend*:
>
>
> anyway this commands i only can change the last 2 commits, strange.
>

Which tutorial is this?

Try this one: 
http://git-scm.com/book/en/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages

 

> someone knows how a can change specific commit?
>
> another thing, i saw in my three show *master | rebase.
>
> and not desapear that as well, someone can help me?
>

I suspect that you are in "rebase mode". That is, you're in the middle of 
rewriting som history, and Git is waiting for you to type things like "git 
rebase --abort" or "git rebase --continue". If you just want to get out of 
this mode, I reckon also a "git reset --hard master" should get you back to 
how you left things in master branch.


-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/zwb3xtRv3_0J.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.