Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Installing Dropbox on Centos 6

  • This topic is empty.
Viewing 15 posts - 61 through 75 (of 93 total)
  • Author
    Posts
  • #182897
    __
    Participant

    github (and similar services; tower also I assume) are actually set up in something of a nonstandard way

    basic concepts. rote memorization is not the way to learn git; it makes very little sense without knowing what it is actually doing and how it organizes things:
    git for ages 4 and up

    Linus talking about git
    (you can skip the first 6-8 minutes if you want; it starts slow)

    There’s another vid that’s really really great, but I can’t find it right now. Don’t remember who did it.

    #182898
    __
    Participant

    git hooks.

    tutorial (pay attention to the “Beta” section; it’s worth doing).

    #183028
    chrisburton
    Participant

    @traq So far have watched half of that video and it’s beginning to make more sense. Thank you!!!.

    #183081
    chrisburton
    Participant

    Let me see if I’ve got this:

    Commit: changes to the code are recorded during this

    Branch: I don’t have a clue

    Merge: takes the commit and merges with the existing code


    @traq
    , @Joe_Temp, @TheDoc

    Adrian, after watching the whole video, it became quite confusing as the audience kept interrupting. It almost seemed as if it threw off Schwern quite a bit. He was all over the place in which at one point the audience had to interject during his model building to correct him. That’s what made it evermore difficult to follow. Another thing, research him (Michael Schwern).

    #183090
    __
    Participant

    it became quite confusing as the audience kept interrupting. …He was all over the place

    Yeah, I think one of the times someone asked him to explain again he accidentally left one of the flags in the wrong spot. Don’t worry about it. Most of the presentation is good, and it leaves you (me, anyway) with a good concept of what git actually does. This helps a lot with remembering the commands.

    Another thing, research him

    I didn’t know that. Ain’t right.
    But about git, he was right.

    Basic Commands:

    Commit: yes, records and documents your changes. Changes are added to the existing repo.

    Branch: branching is when you want to do something new. It doesn’t change the repo at all, but allows your work to be saved in a special “version” of the repo without affecting the master branch or others. To illustrate:

    • I have a repo for my website. The master branch is my “live” site.
    • I want to add a feature. Instead of working on the master branch (and risking breaking the production site), I make a “newfeature” branch and work there.
    • I can make any changes, stop working and start again later, anything, without worrying about affecting the live site. I could even delete the whole thing, and “master” would still be there, unaffected.
    • Say I found a bug in my live site before I was done. I can switch back to master, branch again (make a “fixbug” branch), and fix the bug. I’d have the same isolation in this new branch. When done, merge it back to master and switch back to my “newfeature” branch.
    • when done, do all my tests, and merge “newfeature” back to “master” for deployment.*

    * in this example, I’d actually pull the “bugfix” changes into my “newfeature” branch before merging back with master, so there are no conflicts. but git handles conflicts pretty well on its own, too. If the two branches didn’t actually edit the same lines of code, it would probably figure it out automatically.

    merge: as seen above, merging is when you take the changes you made in a branch and put them back into the master branch (you can merge any two branches, actually, but that’s the most common scenario).

    Commit will be what you do most. These will also be nice to know:

    init: creates a new repo.

    add: put new files into the repo. (commit only works for files already in the repo. If you make a brand-new file, you must add first, then commit it.)

    If you’re working across servers (your host, github, etc.), some others that will be useful:

    clone: creates a new repo by copying another one. works locally, over ssh, https. This is how you get stuff from github onto your local computer.

    pull: gets changes to another repo and merges them with yours (e.g., you made a change to your repo on github and want to update your local repo to match).

    push: sends changes to your repo to be merged with another repo (i.e., the opposite of pull).

    #183092
    __
    Participant

    Minor clarification:

    When I say “master is my website,” I mean that it’s the version of the code that is live, not that it’s actually being served from that directory. One copy of the repo actually is the live site, but you do all your work in a separate repo, then push. Here’s why:

    Branching literally changes all the files on your disk. Don’t be freaked out when this happens. Nothing is lost. If you switch back, the files will switch back also. It’s all still there.

    #183103
    chrisburton
    Participant

    Ah ha. Now all this makes much more sense. Thank you for breaking it down!

    #183110
    chrisburton
    Participant

    Have any of you used Sparkleshare or dploy.io for syncing Github repos to servers? Are there better options?

    I’m going to try dploy.io and see if I miraculously don’t f*** anything up.

    #183111
    nixnerd
    Participant

    Hey @chrisburton… are you looking for something a little more “automatic” or is it that you want a GUI? I don’t know what these things are but them seem to add an extra step that may not be necessary?

    I could be completely wrong. Maybe they have crazy benefit, I just don’t understand them. I usually just clone a repo from Github.

    #183114
    chrisburton
    Participant

    @Joe_Temp I’m looking for something where I can limit dealing with the command line as much as possible right now. I’m not sure how difficult it would be to clone a repo on Centos 6 so I’ll do that research right now. Initially I was having trouble finding the correct terms to apply when searching on doing this. As you’ve just expressed, it appears “clone” is the correct keyword.

    #183115
    __
    Participant

    Have any of you used Sparkleshare or dploy.io for syncing Github repos to servers? Are there better options?

    You don’t need services like this. It’s like hiring someone to turn on your car for you. (Okay, there’s a bit more value than this, but my point is it’s nothing you couldn’t do yourself, and with less hassle once you learn the process.)

    I just SSH to my server, go to the directory, and do git pull. All sync’d.

    Or you could use hooks to tell git to do this automatically, as we were discussing earlier.

    #183116
    __
    Participant

    I’m not sure how difficult it would be to clone a repo on Centos 6

    Not difficult at all. Create a directory, change to it, and do git clone.

    #183117
    nixnerd
    Participant

    I’m not sure how difficult it would be to clone a repo on Centos 6

    Another point on this is that it will be exactly the same as with any other Linux distribution. And… all Git commands are standard across ALL platforms. This includes Mac and Windows. It’s easy as hell dude.

    In 17 minutes, this video will teach you everything you need to know about the basic Git workflow (kudos @TheDoc).

    https://www.youtube.com/watch?v=24NGu1vGBiw

    Github makes this really easy to by giving you the little URL copy button so you can just paste it right in!

    #183119
    chrisburton
    Participant

    clone: creates a new repo by copying another one. works locally, over ssh, https. This is how you get stuff from github onto your local computer. – @traq

    I know you’ve mentioned this before but I wasn’t aware this could be done to the server rather than locally.

    Or you could use hooks to tell git to do this automatically, as we were discussing earlier.

    Right. I know the very basics of SSH (logging in, starting/stopping/restarting apache/mysql, checking statuses and changing directories) and that’s it. Therefore, I just want my server to watch my repo and if there are changes, upload those changes to the server. I’m not sure what all that entails, whether I have install stuff just to give it a basic command to do this.

    #183120
    chrisburton
    Participant

    Not difficult at all. Create a directory, change to it, and do git clone.

    But I’m assuming it would be more than that. I would actually have to install git, correct?

Viewing 15 posts - 61 through 75 (of 93 total)
  • The forum ‘Other’ is closed to new topics and replies.