- This topic is empty.
-
AuthorPosts
-
September 10, 2014 at 9:22 pm #182582
chrisburton
ParticipantSorry I’m so late to the table on this. I’m just so f***ing glad you’re using Git. I’ve only been using it for roughly 6-8 months and wouldn’t dream of NOT using it. I get scared out of my mind when I don’t track a project with Git… so I track everything.
Haha. I was practically bullied into it. But actually, I’m kind of glad I’m going this route and all. I wish you guys would have told me I could use git on my server (maybe you did)! I think version control will be a huge benefit. So…thank you all.
By the way, @Joe_Temp. Check your email.
September 10, 2014 at 9:33 pm #182587__
ParticipantI wish you guys would have told me I could use git on my server (maybe you did)!
I think I tried to explain that early on. But it’s really no different than using it on your local machine, so it was probably a bit of white noise the way I talked about it. Like TheDoc said, you can set up “hooks” so git (on your server) will do stuff in response to another repo being updated (e.g.,
pull
it).September 10, 2014 at 9:44 pm #182591chrisburton
ParticipantI think I tried to explain that early on. But it’s really no different than using it on your local machine, so it was probably a bit of white noise the way I talked about it. Like TheDoc said, you can set up “hooks” so git (on your server) will do stuff in response to another repo being updated (e.g., pull it).
So, essentially, it is similar to what I was previously doing with Dropbox without version control.
September 10, 2014 at 9:57 pm #182594nixnerd
ParticipantSo, essentially, it is similar to what I was previously doing with Dropbox without version control.
Yup. But I love the fact that you can track every granular change and keep want you want… and trash what you don’t. You’re never afraid to break anything… especially if you are responsible about branching and committing often.
September 10, 2014 at 10:00 pm #182595chrisburton
ParticipantAwesome. Just what I wanted/
September 13, 2014 at 2:36 pm #182886chrisburton
ParticipantI don’t understand the whole “stage” thing. Can someone explain that in English, please?
Also, how should I setup my dev branch and master branch? Dev branch locally and then push to master?
And, I can’t find a tutorial in which to use Github to watch my master and then pull any changes to my server.
September 13, 2014 at 2:49 pm #182887nixnerd
ParticipantThe branch really has nothing to do with staging. To have a TRUE stage setup, you need two VPS’s (I know that an apostrophe probably isn’t appropriate there). We talked about this awhile ago on some thread I can’t remember.
A staging server is one that is EXACTLY like your production server… except for the fact that it’s not in production. People can’t stumble across your broken shit.
So, you’ve got your local dev server, your staging server, then your production server. The goal is to test your site or app in an environment that is as close to production as possible… without actually being in production.
The branch is irrelevant to staging. Here’s how I handle branches though:
I create a branch for any new feature or major revision. Then, I merge them into the master once they are stable. MAKE SURE you read up on this. Here is a nice little overview but there’s more out there:
http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
Make sure you understand “-ours vs. -theirs”
Edit: You can stage with a tool like Docker, and essentially split your VPS up into nice little Docker containers. But, to my knowledge, Docker uses a common kernel between all containers. So… If you’re trying to replicate Ubuntu for production and your VPS runs CentOS, I don’t think Docker will work. I could be totally wrong. I hope I am.
September 13, 2014 at 3:11 pm #182888nixnerd
ParticipantDude, I got so confused… I COMPLETELY misunderstood your question. You’re talking about the HEAD aren’t you?
September 13, 2014 at 3:58 pm #182889Alen
ParticipantSeptember 13, 2014 at 3:59 pm #182890chrisburton
ParticipantCan I get a translator? You’re speaking Mandarin to me right now. HEAD?
In Tower when I right click it says “Stage”. That’s all I know.
September 13, 2014 at 4:07 pm #182892nixnerd
ParticipantI don’t use tower… but I’m going to assume that’s the same as:
git add .
When you commit a change, it creates a little snapshot of your project at that time. That’s kind of the last step when you make a change. The step BEFORE that is to add or STAGE things. When you add files or stage them, you’re basically saying “Hey Git… you should give a shit about these files/changes.”
It’s basically a convenience and safety measure so you’re not committing every two seconds. You can git add anytime you like. You should commit at milestones.
September 13, 2014 at 4:08 pm #182893nixnerd
ParticipantYou’re speaking Mandarin to me right now.
Sorry man. Did any of those resources help explain it? The video Alen sent is pretty good if its working.
September 13, 2014 at 4:27 pm #182894chrisburton
ParticipantYes. Your explanation and that article really helped. I haven’t yet saw the video. I will certainly do that tonight.
As of now, still trying to find a tutorial similar to that dropbox thing.
Thank you guys for helping me learn this stuff. I really appreciate it.
September 13, 2014 at 4:30 pm #182895nixnerd
ParticipantI’m not a Git expert but for 99% of your daily workflow… you don’t have to be. If you can learn how to commit, branch and merge, you’ll be fine.
September 13, 2014 at 4:51 pm #182896chrisburton
ParticipantOut of curiosity, what are the search terms that I should use for what I’m trying to do?
In case you don’t know, I’m trying to install git or a daemon of some sorts to watch a private repo I have. If there are any changes, upload those changes to my server.
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.