Looking for a how-to on Git/GitHub


#1

Hello.

(1)
I would like to know more about using this functionality. Is there any “how-to” that can guide a beginner on how to use this tool?

My aim is to make a coding contribution to a Atom package. I am staring to teach myself on what Git and GitHub is. Though I am not sure how the Git/GitHub integration plays into all this.

Any chance there are some guides to help a almost-clueless to get a clue?

(2)
Can the Git/GitHub integration be used offline? Is it possible to use a local folder as server and have this add-on track changes? It would be nice to be able to experiment on what is available without committing to publishing onto the web.

Thank you for your consideration.

  • Dan Padric

Why choose Atom? (ATOM vs VISUAL STUDIO CODE)
#2

git is a very complicated tool and it’s not easy to get to know it well. I’m saying this first to let you know that you don’t have to understand it completely in order for it to be useful to you. Almost nobody understands it completely. The web site I use for researching git is git-scm.com. For learning git, a graphical client can be very useful. I recommend GitKraken for that.

The GitHub integration probably isn’t usable offline, since you’re not connecting to GitHub’s servers. The git-diff package should work no matter where the remote repo is stored, as long as your computer can see it.


#3

Hello DS.

You are very active here. I appreciate you contributing to my conversations.

The suggestions you have made is helpful. This will sure go a long way in understanding these concepts that are new to me. It should be my biggest priority.

The root that brought on my question is still standing. I would like to know more about the functionality / tools that is provided within Atom. It has been introduced into Atom V1.18 recently. Is it still up to the community to document the usage of the integrated Git/GitHub functions? Or is there a how-to guide similar to the “Atom Flight Manual”?

At this moment there is only some “videos” that demonstrate some functionality (https://github.atom.io/). I have tried some functionality offline with an internal project. My project does not seem to go into a “change”/orange state for long enough to make a report (staged changes).

Even git-diff does not run as I expect it to. But again… I am guessing and not knowing how to. A how-to should at least give me an idea if I am doing something wrong.

Hope to chat again.

  • Dan Padric

#4

Are you saying that the files do appear orange in the tree view, and then revert back to normal on their own? What does git status tell you in this case?

A how-to should at least give me an idea if I am doing something wrong.

The git package should (as I understand it) work automatically as long as you’re working inside a git repo and your computer has a connection to the remote repo.


#5

DS, Thank you for your time.

The word counting example in the “Atom Flight Manual” was the Package used to try and test (experiment with) the Git/GitHub functionality. It was possible to create a branch from this, even when it was all offline. Changes did seem to track as (staged) expected, until trying to save the code. Then it seems to revert to the no-change (unstaged) state.

From your description it seems as though keeping connected is the key to all of this. That is a rotten shame. I was hoping to play around with the functionality in a simulated/ offline environment to get a feel for it all. Online time is scarce and expensive for me.

A step-by-step guide (that can be viewed offline) of what to expect, would have been great.

Let us assume this topic is on ice - I’ll see if I can make a plan with some online testing.

Regards.

  • Dan Padric

#6

In your experiment, did you have the remote repo on a different computer? I haven’t tested it myself, but I wouldn’t expect Atom to behave any differently between a remote at 192.168.0.40/github/my_repo and a remote at github.com/danPadric/my_repo.


#7

The last mentioned. I was only linking to internal.
Strange though that the Git system did not complain about it.


#8

Your best diagnostic tool here will be git status. If it shows changes, then the Atom integration should show changes.


#9

Thank you.


#10

The Atlassian Git Tutorial is a very good resource for both beginners and advanced users: https://www.atlassian.com/git/tutorials


#11

Dan,
you should download atom-beta, 1.19 version not 1.18 to have the Git and Github functionality built in.

Also please note that a response was made above regarding Git-hub and the necessity for havign an online connection for Git-hub.
You are looking at using the Git tools, for which it is perfectly possible to have a local repository on your own machine, work on the code there, then push the commits to the remote Git server.

Git-hub is a site which uses Git of course, but there are other ways to us it, that why there is a separate Git tool.


#13

@suranyami: Thank you.

@hearnsj: A valuable reply and tip… something I have to follow through on. ++ just as soon as I get to a stronger web connection over the weekend.

Let me make it clear… I hope to investigate the functionality / principle without dumping stuff on the web.

What I really after is formulating a methodology that will work for my day-time stuff. My main aim would be to have some way to track changes between my partner and I.

:wink: (Every heard of a language called SCL?)

Cheers.


#14

Github integration was introduced in 1.18. I wouldn’t recommend to use 1.19 yet, because it breaks many plugins.


#15

Thank you. From what I understand it would be possible to install V1.19 in parallel with V1.18. So if stuff do work better for some reason, one could get a taste for it with less risk.

Not recommended for someone wetting his toes in the ocean of Atom- right?


#16

The installer keeps your AppData/Local/atom folder updated to the latest version of whichever track you’re running. So no, don’t install the beta version. Just download Atom-Windows.zip, unzip it to somewhere, and use that.

Not recommended for someone wetting his toes in the ocean of Atom- right?

As long as you know which version you’re using at any given time, you’ll be fine.


#17

Git integration (viewing diffs, unstaged/staged files, gutter decorations of added/modified/removed lines, colorization of modified files in the Tree View, etc.) should all work when offline. @danPadric is that not what you’re experiencing? Of course you’ll need to make sure that the folder you’re working in is a Git repository.