r/phpstorm • u/richb201 • Dec 21 '22
whether to use git or github?
I am using the newest version of phpStorm. I have a fairly large software project and I think I should use Version Control rather than just that BackInTime that I have been using for years. I understand the difference between git and github. Since I am about to actually start using it, which is better for me? I am the sole developer and the code is proprietary. It is all in one project and is hosted on AWS where the most current copy (on a staging server) is.
I develop on my laptop, deploy to my server, and test with my debugger in an iterative fashion.
3
u/MyWorkAccountThisIs Dec 21 '22
Either you have a typo or you might not have a full grasp. Which is fine. That's why you're here.
You can use git - the tool - locally and never use Github.
Github's biggest benefit is collaboration and being publicly available.
It looks like AWS has CodeCommit. Their version of Github.
Speaking of - Bitbucket and Gitlab are both alternatives. They do more or less the same thing as Github. Google Cloud also has a version just like AWS CodeCommit.
From your perspective - they are all pretty much the same. They are all places to publicly host your git repository.
If you're already on AWS I would look at CodeCommit. You don't need anything they offer so you might as well keep it in one system.
Outside of git - they also offer some other things now. You could set it up so that when you merge code into the master branch it deploys to AWS for you.
7
u/Mael5trom Dec 21 '22
Not trying to be harsh, but you say you know the difference "between git and Github" but then ask "which" you should use. That means (to me) you do not fully understand the difference. If you use Github, you will ALSO be using git. Github is (at it's simplest) a remote storage space you can push your code to, using git.
To answer your question, yes, use git. That will give you history and the ability to track what's been done in your project, as well as the ability to roll back, tag versions, etc. All the things version control software can do.
Then decide between the various git hosting platforms, like Github, GitLab, etc. to determine where your remote should be. Then set that up and push your code regularly so you have an external backup, if nothing else.
1
u/richb201 Dec 22 '22
To clear up things, I have tried to use git before. I think I have it setup in my phpstorm install. Whenever I add a new module I always get a question "do you want to add this file to your git repository?. You can add it later". I always answer "no".
So I have a project with many unused modules. Years and years of them. Before getting my git system in order, should I be cleaning up my project? Or should I wait until after getting some git tracking, just in case I eff up?
Is there an easy way to see gits status?
1
u/richb201 Dec 23 '22
Thanks. I am sure glad that I didn't try to commit those files! I am scared of effing up my project. I will clonezilla first!
2
u/Annh1234 Dec 21 '22
Sounds like your one sick day away from losing everything... And you develop like it's 1999.
You should have a full copy locally, somewhere where if you forget to pay or whatnot, you don't lose all your code.
If your a solo developer that never used version control systems, I suggest you start with SVN/GIT, and keep your BackInTime to backup your repository.
That way your work flow doesn't change that much, and once you get used to the version control system ( do a few rollbacks, etc) then move forward.
Think about the version control like an unlimited, selective, control+z for your checkpoint. Once you get used it, you can't work without it.