How is git correctly installed on a MacBook?

James Hancock
James Hancock used Ask the Experts™
on
Hi
I'm ready to install git for my MacBook 10.14.6 and command line, for my Javascript game project's source code needs.
I downloaded an install from source forge and my OS claimed it was from an unidentified dev, thus invalid, or something like that.
What is the correct way to acquire the correct version of git? will my OS recognize it as legitimate?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
leakim971Multitechnician
Top Expert 2014

Commented:
go on this page :https://git-scm.com/
click on download link (on the right)
not sure why you want to install from source forge
Hi,

this occured when you try to use different source to donwload / install
from https://support.apple.com/en-ca/guide/mac-help/mh40616/mac
If you try to open an app that isn’t registered with Apple by an identified developer, you get a warning dialog.
This doesn’t necessarily mean that something’s wrong with the app...


If you have already installed XCode you probably already installed GIT
you can check with command line
$ git --version

Open in new window


Here is a tutorial https://www.atlassian.com/git/tutorials/install-git
James HancockSelf Employed

Author

Commented:
Thanks

leak,
if I download the 2.23.0 link for install there, will it do everything automatically for git to work in the os X console?
The source forge thing must have just been a link from a google search.

The file can be acquired there also, I see.. here
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Hi,

Did you already installed XCode yet?
If so GIT is already installed
you can check with command line
$ git --version

Open in new window


You may need to install the command line developer tools on Mac OS X.
OS X already have GIT, you need to install these tools for things to work properly.

To do this, simply run this in your Terminal:
xcode-select --install
 
Follow the on-screen instructions ...

I do prefer to stay away from sourceforge...
Multitechnician
Top Expert 2014
Commented:
if I download the 2.23.0 link for install there, will it do everything automatically for git to work in the os X console?
yes, I installed mine like this and it work perfect
Please check first if it is already installed...

The latest version is  2.23 (source code 2.24)
https://git-scm.com/download/mac
from the official web site the source are on source forge ... this is kind a little bit strange /  ironic ;)

You can also get the source from https://github.com/git/git/
James HancockSelf Employed

Author

Commented:
Thanks so much..

from my console:

$ git --version
git version 2.23.0

Open in new window


Now for the real fun :) :)
Does this make sense? I was trying to do this for a little while, as u know, but on my older MacBook, and I followed a suggestion and did this on a new MacBook, and it worked immediately. Make sense? It was like my old comp was cursed.
I got the new MacBook, btw,  coz it was suggested that a dedicated comp be done for a server dev.
I'm also keeping in mind that I was also advised to do dev on the final intended system.
In learning how to make phone games, I doubt I need to complicate anything that much yet.
Hi,

I'm glad it working :)
Yes since OS X it already have GIT installed, on older OS you need to install it or install a package like Xcode (that have it)...

Just take it one step at the time, take notes and do experimentation...
James HancockSelf Employed

Author

Commented:
Thanks
What is the correct way to get GIT working in Atom?
Usually, it's to find packages in the preferences of Atom menu? Which one?
"language-git" - git editing support in Atom. There are others.
What mistakes are there to make?
Thanks

Remind me, GIT is useful to get projects up super quick? the Udemy demo doesn't use Atom

What should my "Hello World" exercise be?
Hi,

You can use any IDE you like.

I do not use Git, I mean this is not necessary but many user use it so it depend.
You are exploring new things, you will make try and errors and you will find what work for you.
There are many way to make a dev server setup.

I don't  know much about Atom you may post a new question about it.
You can find some documentation about it
https://flight-manual.atom.io/using-atom/sections/version-control-in-atom/
James HancockSelf Employed

Author

Commented:
Thanks
Big help
I wonder if it's not possible to ignore the project tracking and updating aspects of git, and just assume that the current version is acceptable (I only need a git project for a javascript phone game ground-floor startup project, so that probably will never need updating, once I get the basics working, - - touch moves and game-loop initialization)
Are you inclined to agree?
Can I do just a one time extraction of a project and not connect it back to git? just use the files in Atom?

How do I look for this specific project?
Hi,

GIT can be use the way you like.
The main purpose is for file versionning and sharing code.

For example you may use Github for your project (public or private) https://github.com/pricing
This allow you to have a backup of your script on the cloud.
By doing commit you can keep a track of the changes so you can rever back easily if needed.
With  Git you can share your code with other dev.

You can use GIT command for downloading script.

You can use GIT to deploy a project or use as source
Localhost <-> Push to Github <- Pull from Github onto your server

Or you may not use GIT at all, it is not required.
You can do it other way, it's up to you.

Here is the way I do without Github
In any case it good to have a daily backup of your work saved on a cloud (I do encrypt my zip file and use Idrive and axcrypt)
Use a file comparision like araxis merge
Document your work, and use version for your project.
Use a bug tracker like Mantis it's free.
I install package using command line

But like you see using Github can do all this, so you save time by using it.

Atom is a code editor / IDE , to edit your code, so you don't need to use Git in order to use Atom.
The idea is that Atom is ready to use with Git so you don't have to many thing to install.

The GitHub package brings Git and GitHub integration inside Atom
https://github.atom.io/

Read the doc https://flight-manual.atom.io/using-atom/sections/github-package/
James HancockSelf Employed

Author

Commented:
I'm going to pull this project from Github

https://github.com/stackshub/stacks

If I do it in the Xcode git dialogs into a git repository, should it all work, no problem?
It will fit in its own Xcode project folder and all that?

Thanks
I suggest you to open an new question as your primary question was about installing Git on a MAC.
 
With a new question you will have feedback from  Xcode  user.

Here is a tutorial on how to use github & Xcode
https://blog.chrishannah.me/using-github-and-xcode-together/

Note when browsing Github project  you can always just download the source file manually using clone or download green button.
James HancockSelf Employed

Author

Commented:
Thanks

I am using Mac Atom, not Xcode.

Maybe we can walk through a set-up of a pulling of any simpler javascript game into my IDE.

I have a Git tab (does create repository), and git-diff and GitHub in my packages menu.
Hi,

Now that Git is installed and the question is solved you can accept an answer and open a new question
about how to pull / manage your code using Git and ATOM or a more precise question...

You need some time to learn GIT & Atom

What I suggest you is to check some video, do some reading make some tests then open a question,
otherwise it may end to a too broad question.

Here some references, as you starting to use Atom and Git

There are plenty video on Atom and Git on Youtube
https://www.youtube.com/watch?v=7Id1_VfbEKo
https://www.youtube.com/results?search_query=how+to+set+atom+with+git

Official GIt training
https://www.youtube.com/channel/UCP7RrmoueENv9TZts3HXXtw

How to set up Atom
https://www.youtube.com/watch?v=U5POoGSrtGg

On Udemy
https://www.udemy.com/course/brief-introduction-to-atom-editor/
https://www.udemy.com/course/intro-to-git/
https://www.udemy.com/course/github-ultimate/

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial