[epiar-devel] Changing commit message
thezweig at gmail.com
Sat Oct 2 23:19:02 PDT 2010
I'm a vim fan so this has never bothered me, but I think that git just runs the program that you have set as your $EDITOR. Use google to figure out how to change your default editor.
All you should have to do to save your commit message is save the file (after making changes) and quit the editor. In vim you can do this by typing :wq.
But I don't know if that's what you meant by 'submit'. Did you mean that you're stuck on the pushing step instead?
There's a program called "tortoise git" that you can use if you prefer a GUI to this command line stuff.
On Oct 2, 2010, at 10:58 PM, Doug Mirro <dmirro at easytechtalk.com> wrote:
> ok when i do git commit after adding 1 file i get to a screen that looks like VIM from unix. I type my message and can't figure out how to get it to submit.
> Doug Mirro
> Easy Tech Talk - Technology made simple
> On 10/2/2010 2:00 AM, Matthew Zweig wrote:
>> Unlike most versioning systems, git doesn't assume that all you intend to commit all your local changes when you use "git commit". While this sounds counter intuitive, it's meant to enforce the idea that each commit should be thematically distinct. That means, if you change the way that logging works and you change the way that Images are drawn but these changes aren't related to each other, git makes it easy to commit them as different changesets. This makes it easier for people reading your changes to understand what you're trying to do. If you're looking at a changeset titled "Make Video a true static class, not a Singleton Instance class", you can be pretty sure that all the changes relate to the Video class, even though the developer may have been working on multiple components when they committed that. This makes it easier to identify related changes.
>> To commit a change, you usually need to "stage" it first. You do this with the command "git add X.cpp Y.cpp ...". This tells git that you want to commit these files as they currently are. (If you make more changes to these files, those changes won't be staged until you add them again.) Once you're satisfied with the changes in the staging area, use "git commit". This will open up an editor for you to record your Change Summary.
>> You can also use "git add -p" to stage only some of the changes, rather than an entire file.
>> To skip the staging area you can use "git commit X.ccp Y.cpp ...".
>> You can use "git commit -a" to commit all of the changes that you've to any already added file, but in general I consider this 'dangerous' since it makes it easy to "accidentally" include changes that you didn't intend to commit. I don't suggest using it until you have a grasp of git.
>> Of course, our goal is to have a working game, not to have a pretty git repository, so if you make mistakes, don't worry too much about it.
>> In your case, I would suggest something like this:
>> $ git add Source/Graphics/image.cpp Source/Graphics/video.cpp
>> $ git commit
>> (Explain why you're changing the Image and Video implementations)
>> $git add Source/Utilities/log.cpp Source/Utilities/log.h
>> $ git commit
>> (Explain why you're changing the logging implementations)
>> $git push master origin
>> "master" is the default branch.
>> "origin" is the remote path that you want to push to. Use "git remote" to see a list of the remote paths that you have already recorded. You should probably have at least two: one pointing to your github, and one pointing to mine (since I'm the maintainer of the 'official' Epiar master branch).
>> I hope that helps,
>> On Sep 30, 2010, at 10:04 PM, Doug Mirro wrote:
>>> Ok so I think I'm having a problem pushing. When I type "git status" I get the following:
>>> On branch master
>>> Changes to be comitted:
>>> modified: Source/Graphics/image.cpp
>>> modified: Source/Graphics/video.cpp
>>> modified: Source/Utilities/log.cpp
>>> modified: Source/Utilities/log.h
>>> How do I push these files so they can be added to the main branch?
>>> Doug Mirro
>>> Easy Tech Talk - Technology made simple
>>> On 9/29/2010 8:00 PM, Matthew Zweig wrote:
>>>> Your commit isn't on github so it looks like you haven't pushed your change publicly yet (or you did and then deleted the public copy). Let me know if the problem is in the pushing step.
>>>> I would use either "git commit --amend" or "git rebase --interactive". depending on if it was your most recent change or a change that was a few changesets ago.
>>>> As much as I love the command line, the GUI tool that I use does this fairly easily, so I do this all the time.
>>>> StackOverflow has some pretty good answers here:
>>>> To see what you've committed, you can always use "git log". Personally, I think that a GUI is best for looking at the DAG (Directed Acyclic Graph) of a repository, but you can use "git log --graph" as well. To see what's been pushed to github, I refer to:
>>>> Thanks for caring about the quality of your commit messages, but don't let that stop you from contributing changes. A few sub-par messages isn't a big problem.
>>>> On Sep 29, 2010, at 4:48 PM, Doug Mirro wrote:
>>>>> I've committed some files and pushed them to master and don't know if my commit message went through, is there a way of checking it and changing it if it's incorrect?
>>>>> Doug Mirro
>>>>> Easy Tech Talk - Technology made simple
>>>>> epiar-devel mailing list
>>>>> epiar-devel at epiar.net
>>>> epiar-devel mailing list
>>>> epiar-devel at epiar.net
>>> epiar-devel mailing list
>>> epiar-devel at epiar.net
>> epiar-devel mailing list
>> epiar-devel at epiar.net
> epiar-devel mailing list
> epiar-devel at epiar.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the epiar-devel