G'day Aldebaran,

[OT: my response only addresses GitLab and git commands — there's no Perl components.]

I use GitLab extensively for $work. I regularly use dozens of repos. I do all my work from the command line. I'm aware that a number of git UIs exist; perhaps other monks can tell you about those.

Git has a lot of commands and they take many options and arguments. I'd recommend that you bookmark "Git - Reference"; use this while reading the following and for future work.

For the following, assume I've collected all cloned repos in a 'gitdir/' directory. I've used 'git.example.com' for the base URL. The project and repo are called (unimaginatively) 'project' and 'repo', respectively.

When starting a new project, the first thing to do is clone the repository (which you indicated that you've already created).

$ cd gitdir $ git clone https://git.example.com/project/repo.git

You can now perform a verification and, what I always do, avoid having to continually retype my username.

$ cd gitdir/repo $ git remote -v origin https://git.example.com/project/repo.git (fetch) origin https://git.example.com/project/repo.git (push) $ git remote set-url origin https://username@git.example.com/project/r +epo.git $ git remote -v origin https://username@git.example.com/project/repo.git (fetch) origin https://username@git.example.com/project/repo.git (push)

You can now begin to add, modify or delete files under "gitdir/repo/". I recommend you use the status command often; it'll mostly tell you what you need to do next. When you do this, your current directory should be "gitdir/repo/", or one of its subdirectories.

$ git status

Common commands you'll use at this point are:

$ git add ... $ git commit ... $ git push

Following a push command, your changes should now be visible via the GitLab web interface.

Those commands probably cover 90% or more of what you'll generally need. You may also want to create branches and tag releases; very briefly:

# Create a branch $ git branch branch_name # Create a branch and switch to it $ git switch -c branch_name # Switch to an existing branch $ git switch branch_name # Publish a new branch (now appears in GitLab UI) $ git push -u origin branch_name # Tag a release (as "v1.000") $ git tag -a 'v1.000' -m '...' # Publish a new tag (now appears in GitLab UI) $ git push origin 'v1.000'

There's a lot more to git but I think this pretty much covers the basics. Revisit the reference documentation for more.

— Ken


In reply to Re: Using perl to script an upload page [OT - no Perl] by kcott
in thread Using perl to script an upload page by Aldebaran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.