On Sun, Apr 07, 2013 at 12:07:49PM -0700, Bart Schaefer wrote: > The one thing I'm finding missing from both places is a discussion of > how to perform a simple one-file (well, two, counting ChangeLog) push > directly from a clone of the master. Can I --amend a commit without > having a branch, or must I wait even to commit until I've edited the Technically you're always on a branch (ignoring detached HEAD here), it's just the master branch and not a special branch created for a specific feature. Of course you can --amend on the master branch without creating a new feature branch (in Git all branches are equal). Don't --amend anything public though, e.g. nothing which is already in origin/master. > ChangeLog? Or is creating a branch THE way, and I should ignore all > the discussion of branching for "a feature" and just create a branch > that's always there and use it repeatedly whenver I edit? Normally you're on the master branch which tracks the remote branch origin/master. How you work with this branch depends on your workflow. Some people prefer to always create new branches for specific features, this is the workflow described by Frank, others just work on master for small features (e.g. the one file change you just mentioned) and push that to the remote. It depends what you like better. From Git's point-of-view you don't have to create any new branches at all, but it's sometimes/often useful. Personally I don't use any extra branches for small features, but that just my preference. Using _one_ extra branch repeatedly is not necessary in Git, as branches are very cheap. If you want a new branch for this feature, just create it (with an appropriate name) and remove it later once the changes are merged/pushed to origin/master just as Frank described. One the other hand if you don't need a specific feature branch, just work on master. Regards Simon -- + privacy is necessary + using gnupg http://gnupg.org + public key id: 0x92FEFDB7E44C32F9
Attachment:
signature.asc
Description: Digital signature