tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Help with git/wip



On Wed, Jul 26, 2017 at 02:18:00PM -0400, D'Arcy Cain wrote:
> On 07/26/2017 01:47 PM, Thomas Klausner wrote:
> > Now that I know what you wanted to do, here is how to do it:
> > 
> > vi Makefile
> > git add Makefile # to tell git that you want to commit this modification with the next commit
> 
> So "add" is really "add to files that I want to commit".  Do I also use it
> to add new files?

Also git add.

> > git rm -r pkgin # automatically tells git to add this to the next commit
> > git commit
> > git pull -r
> > git push
> 
> So "commit" doesn't actually commit?

Yes.

> And why the pull again?

Pull before push is to make the window small in which other users have
committed and pushed changes.

> Do all of these extra steps seem reasonable to git users?

The main difference between cvs and git in your use case is that the
interaction with the remote server is separate from the committing
stuff. All the git add/git rm/git commit only works locally, and
there's a second, separate step to interact with the server. I think
if you keep that in mind it's not so outlandish any longer.

> > git commit -a # adds all uncommitted changes to the commit
> 
> Is there a config file like in SVN where I can make that a default argument?

I think you can define your own commands, e.g. a 'git commitall', but
I don't know offhand how.

> Or, can I do "git commit Makefile pkgin" without the "add" instead?

I'm pretty sure that works too.
 Thomas


Home | Main Index | Thread Index | Old Index