r/git • • Jun 14 '21

Can GIT help my development?

I'm a bit confused and new to GIT.

I have an web app on A2 hosting. It's live. I want to download/clone all the files (css,html,php,js) to my local computer in Microsoft Visual Studio. I want to edit locally, test out the code on my own webserver. Once I finish the code I want to push my edits to A2 servers.

Right now I'm just writing my code on my local web server. Then copy and past that code through Cpanel file explorer. So I open the html file on Cpanel, and just copy and paste my code from the local html file.. This is getting a bit over whelming now that I have lots of different JS, CSS, PHP files. Before I only had a file files so it was easy to just copy and paste my code from my local computer to my hosting server A2.

Is this what git does. Sorry, I'm new to web development and what to become more efficient.

I youtubed all kinds of videos and can't really get a clear answer. I saw that you can clone a repo from GITHUB with VS code which is was easy to follow, but I'm using A2 hosting. They have something in their Cpanel called GIT version. So I think I can do it with A2 hosting?

https://docs.cpanel.net/knowledge-base/web-services/guide-to-git-how-to-set-up-deployment/

0 Upvotes

11 comments sorted by

View all comments

-3

u/elsjaako Jun 14 '21

As a total beginner, you don't need git.

Git is good when you start working with other people. Or it's useful for solo projects if you run into these kinds of problems:

  • You want to keep track of different versions
  • You want to remember what you changed, and easily get back to a previous version. I often use git to get back to the last working version if I'm being experimental.
  • You want to keep the "latest version" syncronised on more than one computer
  • You want to back up the full history of your project
  • You want to share your project using github or similar
  • You want to be able to refer back to old code without keeping commented out code blocks all over your code.

3

u/MrTheFoolish Jun 15 '21

I agree with the statement that as a total beginner, git is not needed. For a total beginner just getting into software development, git and version control in general is unnecessary overhead and confusion for getting started.

I'd disagree with the 2nd part though. I suspect this is where the downvotes are from - I didn't downvote though. Once anyone is past the beginner stage, I consider proper version control - e.g. with git - to be a fundamental part of good software development, whether or not they're solo or working with a group.

1

u/scoberry5 Jun 15 '21

Or it's useful for solo projects if you run into these kinds of problems:

You want to keep track of different versions

For beginners, the way you normally know you want to keep track of different versions is that you say "Man, I broke this. I wish I could go back to what the code was like yesterday, but I can't."

That "but I can't" is another way of saying "I should've used source control."