discuss: Getting Started With Working With Git


Previous by date: 4 Feb 2016 00:59:20 +0000 Re: Getting Started With Working With Git, Martin A. Brown
Next by date: 4 Feb 2016 00:59:20 +0000 Manifesto: Proposed deletion of publishing info from 2008 Manifesto, David Lawyer
Previous in thread: 4 Feb 2016 00:59:20 +0000 Re: Getting Started With Working With Git, Martin A. Brown
Next in thread: 4 Feb 2016 00:59:20 +0000 Re: Getting Started With Working With Git, David Lawyer

Subject: Re: Getting Started With Working With Git
From: Mark Komarinski ####@####.####
Date: 4 Feb 2016 00:59:20 +0000
Message-Id: <56B2A29B.9050100@wayga.org>

On 2/3/2016 6:11 PM, Paul Hendricksen wrote:
> Hi everyone,
>
> How can I start submitting to Git? Is there a getting started guide I can
> read?
>

Hi Paul,

Here's the steps I've been going through (and it's partially documented 
at 
https://github.com/tLDP/LDP/blob/master/LDP/guide/docbook/LDP-Author-Guide/git.xml 
).  I'd say be sure to go through Martin's e-mail and make sure you 
understand how git and GitHub work.  If you get yourself in a state 
where git gets all confused, there's no harm in deleting your local 
repository or deleting your Forked copy (you'll see big warnings about 
this, but it'll only affect your private fork) and starting over.  You 
don't have the authorization to make changes to the LDP repository so 
you can't mess anything up.

First time use:
1) git clone https://github.com/tLDP/LDP
(after this you'll have an LDP directory with the entire tree of ~400MB)
2) From your GitHub account, Fork the LDP repository into your private 
repository
3) git remote add upstream ####@####.####

Each time you have an edit:

3) Find the HOWTO/Guide you'd like to edit
4) git checkout -b MyNewBranch
(MyNewBranch  is a name that can be whatever you want, I usually make 
the name relevant to the changes I'm making)
5) Make the changes you'd like, verify the XML is valid, etc.
6) git diff .
(verify the files and changes you're proposing)
7) git add changedfile.xml
(you can list multiple files here)
8) git commit -m "I modified these files in this way"
(if you just say 'git commit' you'll be dropped into a text editor)
9) git push -u upstream MyNewBranch
(this pushes your changes to your Forked copy of LDP)
10) From the GitHub website, you'll see that you have a new branch on 
your Fork and a button for generating a pull request.  Clicking that 
will generate a request to the LDP staff to review and approve the 
change.  You'll get an e-mail when the pull request is approved

Once the change is approved, you now need to clean up and update your 
repositories:

11) From the GitHub website, you can now delete the MyNewBranch branch
12) git branch -d MyNewBranch
(deletes the local copy of your branch)
13) git pull origin master
(update your local master branch with what's on the LDP github)
14) git push upstream master
(update your forked copy)

This is what has been working for me, if anyone sees obvious flaws or 
improvements I'm happy to accept them.

-Mark

Previous by date: 4 Feb 2016 00:59:20 +0000 Re: Getting Started With Working With Git, Martin A. Brown
Next by date: 4 Feb 2016 00:59:20 +0000 Manifesto: Proposed deletion of publishing info from 2008 Manifesto, David Lawyer
Previous in thread: 4 Feb 2016 00:59:20 +0000 Re: Getting Started With Working With Git, Martin A. Brown
Next in thread: 4 Feb 2016 00:59:20 +0000 Re: Getting Started With Working With Git, David Lawyer


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.