Conversation started Feb 20, 2017 at 14:03.
Feb 20, 2017 14:03
Do I need the GitHub tools installed on my machine to use RD's SC? Would it be a good idea to have them anyway so I can do some things outside of RD if necessary?
I didn't get nearly as much reading done over the weekend as I'd planned. :(
Feb 20, 2017 14:22
@FreeMan it's always a good idea to have a command-line tool to do git - a GUI can only ever expose a subset of the features.
The RD SC panel lets you launch your favorite CLI tool from the SC toolbar, too
@Mat'sMug can or will? :) I figured it's best to learn at least a bit of the CLI as a fallback anyway. Thanks!
well, the GUI would be outright daunting if it exposed a command button for everything git can do!
fair enough, it's already daunting if you don't know what you're doing! ;)
So, if we're using Git, I need to create the repository somewhere local to me, not where everyone else on the team can access it. They only get to it through Git, right?
Feb 20, 2017 14:39
either way works, you can create a local repository and then publish it, or you can have a remote repository and clone it locally
Gah! but, if someone else wants to get the code, they should only get it by cloning from the repository, right?
There's no need, and it's actually BAD, to put the code on a shared location on the network where everyone can get their fingers in it bypassing Git. right?
they'll fork your remote (so they have their own remote), and clone their fork locally
@FreeMan not if you mean to work locally
@FreeMan When we need a local repo, we publish to the network location and clone to local machines. Think of the online provider just like you would any other network drive. Github is more like Dropbox for the published repository with some web tooling built on top of it.
And the remote is the part that lives on the Git server (be it GitHub, another host, or privately hosted). My local is my clone of the remote. Then I work off that, forking as necessary for different changes (bug fixes and dev work). I then PR into my own local, make sure I didn't break anything, then merge to the remote on the server?
crap, really shoulda done some reading over the weekend!!!
Feb 20, 2017 14:45
lol, you don't PR into your own local - you work off your local
You would just be commiting to your local and synching with the remote.
ok... I commit to local, sync to remote then PR when I've got something that is a "final" product ready to move to production.
production being the master on the remote
PR is only to merge changes from a fork into the head branch.
or vice-versa
so I fork from remote or local or both?
Feb 20, 2017 14:48
if you're the only dev, you probably don't need to fork
The workflow really depends on how you want to do it. You can use a fork workflow, but that's usually more appropriate for larger projects with lots of contributors. For projects that you work on as the only dev, just branch.
OK, what's the difference between a fork & a branch?
[rubberduck-vba/Rubberduck] is the "main repo". [retailcoder/Rubberduck] is my "fork". both have a [next] branch. so when I make local changes to [retailcoder/Rubberduck/next] and I want to bring in these changes to the "main repo", I make a PR from [retailcoder/Rubberduck/next] into [rubberduck-vba/Rubberduck/next]
but before I can make a PR the remote needs to first see my local changes, so I push my local commits to my fork
a branch is really just a copy of the project, ...kind of like a folder (in SVN it's actually a physical folder)
you push from your branch to your fork "next", then PR to remote/next, then merge from remote/next to remote/master ?
On the other hand, a branch stores the branched commits in the same repository. When you merge a fork it's kind of like retroactively branching.
Feb 20, 2017 14:55
@Comintern I think @FreeMan might need CPR after that one
my fork is my copy of the remote repository. I work on branches (one for this bug, one for that feature, etc) that are only in my local. I commit changes to the local branch I'm working on, push those to my local "next", then PR to the "main repo" Next. Eventually those get pushed from "main/Next" to "main/Master".
@Mat'sMug, @Comintern Yeah, CPR, coffee, something.
the branches can be local-only, or published on your remote too
"push" implies a remote
next is an RD term that fits our workflow. You'll find it easier when you're reading about it to call it the head repository.
The advantage of the remote is that it's on a server being backed up, it can be accessed from anywhere, others can share in the work, etc
Feb 20, 2017 14:58
The advantage of a remote is that you can completely jack up your local and then delete it. :-)
The local should, of course, be backed up regularly, too.
@Comintern that makes sense.
if you're working in local branch "feature" and want those commits into your local branch "master" all you need is to merge. then your local master will be desynchronized from your remote master; when you push the local commits they'll be on the remote, but still in your fork. then at one point you're happy about your changes and you want them into the "main" repository, so you make a pull request to grab "master" off your fork and merge with "master" off the "main" fork/repository.
You shouldn't ever really need to back up your local unless you have a ton of unsynched work.
If you feel the need to back up the local, it probably should have been a fork.
@Comintern then what you need is a better workflow, not a backup :)
Feb 20, 2017 15:04
So what I need is a test project with nothing but some text files so I can get the hang of this without royally screwing up anything, then figure out my workflow, then move on to the real thing.
eh, I'm still figuring out stuff ..3 years into it
I'd like to have a vaugish idea what I'm doing before I try to put the code I've been working on for the last 2.5 years into it then hose myself... :/
@Comintern if my fork is located on my local hard drive, and it takes me a couple of days to figure out a bug, then I need a backup of my local hard drive until I'm ready to push to the remote master, right? My local master is at the mercy of the hard disk that it's physically stored on until it's either backed up or merged with a remote somewhere else, correct?
@FreeMan Maybe you should keep your fork on GitHub.
if you have a "fork" on your local without a remote, you don't have a "fork", but a "clone"
anything local-only is indeed subject to what I like referring to as "the bus factor"
3
Feb 20, 2017 15:26
I think the issue is that the code we have is the master copy, and when it goes into GitHub, it will be in an account under my name. That will be our Remote. Anything that's being worked on will be by me or the one other guy who occasionally gets in there and rummages around a bit.
I think my confusion is between my fork on GH and the master on GH, but under my account.
at least, maybe that's what's confusing me
@FreeMan make an organization to host the "master"
or just consider your fork as "the master"
and then be careful with what you commit/push directly into the "master" branch
since this is corporate code, I'm thinking that we may actually install a local Git server. I mean why not? I can barely manage to figure out the basic concepts, I'm sure I can handle administering the server, right?
:/
@FreeMan There really isn't such a thing as a "git server", unless you mean "file server".
well it's a server and it's running git
Feb 20, 2017 15:34
we can install & host our own Git host, right? It's somewhere around chapter 8 of Pro Git (I didn't get much beyond the TOC this weekend. :(
oh..I thought you meant hosting github on your own servers
@Mat'sMug yeah, that's what I meant. Obviously, it's not what I said.
so yeah, $$
"right on the $$", or "$$ to buy a license to host", or "he's so uncool he doesn't have a clue"?
It's really just a web front-end. If you want the visualizations, you can also just use a fat client git UI.
Feb 20, 2017 15:38
well, there's all the project management tooling, too - github > git
> $21 per user / month

Host your team’s code on your own servers or in a private cloud with your existing security controls.

Sold in packs of 10 users
and billed annually.
so.. $2,520 / year
@Mat'sMug ah, carp. Since there's only 2 of us, I'm sure we'd go for the Organization option. I'm sure we could shake loose that little bit of coinage, but I have to get a full handle on it first. Get buy in from the other guy (who carries all the weight in recommendations), and I'm good to go.
Hey man, you know GitHub? How about we put all our stuff on private repositories? There's a small monthly fee, but I'm sure we could convince management to grant it - github is just so awesome isn't it?
or just make everything public and have management recommend making them private
they'll think it's their idea!
Yeah, something like that, but more like "Hey man, let me show you how awesome GitHub is..."
if he knew it, I'd be asking him!
"Oh crap, I just 'accidentally' formatted our working directory! Good thing I've been playing around with Github..."
2
that might sell it! :)
Feb 20, 2017 15:49
also, the bus factor
@Comintern So... Can I use the network location as my "Master Repo" location, then have each of us fork to our own local (network) location, then clone to a local (another network directory or local HD) location for the actual day-to-day work?
light bulb starts to glimmer, but isn't fully bright yet
of course you can :) your respective forks should be on the network though, and backed up. e.g. under your user profile's documents folder, i.e. not local.
@FreeMan What we do here is use a network share "\\Dev\Source\" to store all the "master" repositories. Everyone clones them to local, and then synchs back to \\Dev\Source\.
If you wanted more control over what gets put into your "master" than that, you would probably want to use forks.
and, since the Master repository is not on GitHub itself, there's no need to worry about it being visible to others, and there's no need to pay to make it private
correct
Feb 20, 2017 15:57
light bulb glows brighter
you just need to know what you're doing, because you're not getting the flashy web front-end
light bulb flickers
Oh, wait, I can still use the Windows and/or RD client, I just don't get the pretty GitHub front end, right?
correct
light bulb glows steadily
pretty sure GitHub for Windows is hardwired to GitHub though
Feb 20, 2017 16:00
Wingit has a GUI, and you can point it to anything.
Never use it personally though.
OK. I think I'm starting to git it.
working as I am with GitHub for Windows (for now at least) and "TestGit1" located on the server. I've made a couple of changes and committed them them both. I did a Sync, then created a PR. I clicked the "View it on GitHub" link, then merged it.
simple when you're just typing some text. Merges will be more difficult if two of us are modifying the same sets of files...
that's where many, smaller modules with many, smaller functions becomes more valuable - more likely to be working in different areas of code, thus less likely to have merge conflicts by changing the same code twice in different ways.
@Mat'sMug Sounds like a good way to get GitHub IP-blocked at the firewall.
Management probably won't know that they have a private option.
@Comintern Is this the "wingit" of which you speak?
Feb 20, 2017 16:17
@FreeMan No, it's the one published by the git maintainers: git-scm.com/download
There are links to other front-ends there too, but I'm not familiar with any of them.
Ah, saw that in my google-fu too, just wasn't sure.
Feb 20, 2017 16:57
@Mat'sMug - If the Worksheet_SelectionChange is in a private worksheet code sheet (and that's the only place it is going to trigger) and not a public module code sheet then it is implicitly private. — Jeeped 4 mins ago
#nope
@Mat'sMug - Hmmm, well I know you cannot call it from another codesheet. It must be public to that codesheet but private beyond that. — Jeeped 1 min ago
Huh?
Feb 20, 2017 17:20
Don't COM event interfaces have to be public? You couldn't register as a listener if they weren't.
the interfaces are. the handlers are just like every other interface implementation
I think I must not understand WTH he's trying to say there...
I don't either
it makes no sense
ugh, stupid Case Is syntax. I gave OP uncompilable code
Select Case True?
Feb 20, 2017 17:45
ugh, even worse
@Jeeped If I have that handler in Sheet1 and make it say Debug.Print "Hello", and then go to, say, Sheet2, and expose a Public Sub Test() that does Sheet1.Worksheet_Change Range("A1"), I get "Hello" printed to the immediate pane. Seems Public means "public" after all ;-) — Mat's Mug 1 min ago
^ if that doesn't do it, I'm out of arguments
Feb 20, 2017 18:43
gosh, almost 2PM again
TFL
Feb 20, 2017 19:37
@FreeMan You might want to have alook at the folllowing guide.
I found it rather helpful when starting with git.
 
Conversation ended Feb 20, 2017 at 19:38.