Jump to content

Recommended Posts

Howdy,

 

I am currently re-writing some of the code of my history blog and I am thinking of uploading it to GitHub, since the newest codes seems very well written, in a way that I have gotten way better at programming. Since all of the future employers look at GitHub and they keep complaining I have merely tiny programs there, for some reason.

 

 

Do you think this is a good idea, or my website will get hacked straight away? Also that will motive me to document it well and stuff.

 

Of course I will skip the login script and all DB info.

 

I am mainly doing it for my future employers to see the code I write, generally, without having to send tons of .rarS via email.

 

Many Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/298042-open-sourcing-a-website-good-idea-or/
Share on other sites

For those employers putting weight on things like this, you get more credit for contributing code to other projects.

 

Don't get me wrong, if you want to be good at something like using git for VC, you have to actually use it, so you could make a bitbucket account and store your full site code in a private repo, and I'd suggest that you do so, but not for the benefit of potential employers.

  • Like 1

For those employers putting weight on things like this, you get more credit for contributing code to other projects.

 

Don't get me wrong, if you want to be good at something like using git for VC, you have to actually use it, so you could make a bitbucket account and store your full site code in a private repo, and I'd suggest that you do so, but not for the benefit of potential employers.

 

May I ask, is version control  helpful to a project? Because now I am still using CTRL + Z, hehe.

Yes, unquestionably. Once you start using version control you'll never want to work without it ever again. It's far too much headache to try to remember what you changed, when you changed it, why you changed it, and how to unchange it when something unexpected breaks. It is silly to work that way.

 

Even for personal projects where you are the only developer, version control is still an indispensable tool.

  • Like 1

Yes, unquestionably. Once you start using version control you'll never want to work without it ever again. It's far too much headache to try to remember what you changed, when you changed it, why you changed it, and how to unchange it when something unexpected breaks. It is silly to work that way.

 

Even for personal projects where you are the only developer, version control is still an indispensable tool.

 

Thank you, I will try it then. I didn't realize how powerful it was.

Git is one of the most important software development technologies to emerge in the last decade. It's pervasive use has given rise to github, and it has basically taken over version control, as well as vastly improving the effectiveness of open source projects.

 

Yes version control is indispensable in my opinion, not to mention something that differentiates professional developers from hobbyists.

 

It's also an excellent tool for pushing code to production, especially for small companies.

 

 

Old way:

 

Develop (locally perhaps?)

Figure out manually how many scripts were changed.

Use some tool to FTP files. Do you trust file stamps? Maybe use ftp tool, and pray that you don't have a burp in the middle.

Oh crap! It's not working, did we miss a file? Sit down and try and get it working again by manually going through the list of files trying to remember what exactly you changed.

 

With Git:

 

Develop, iterate, push to git branch. For simplicity/1 person you can just use master branch.

Time to deploy? -> git pull (on production machine). Did something go wrong? Git is atomic -- all files will be deployed or none.

Something wrong? git checkout {previous commit#} We are back to where we were, and you can relax and figure out what went wrong on dev!

 

 

And of course version control answers questions for you along the way like-- what did I change last month in that module? Did that other programmer add a regression, even though he said he didn't change anything? What is the change history of this file?

 

Just an amazing tool, from Linus Torvalds, that when all is said and done, will probably be more important to the future of software engineering than Linux.

  • Like 1

Not to mention that because Git is decentralized, you basically get a free code backup every time you push to a remote repo. And, it's pretty damn hard to do something to your repo that causes you to lose work. Git has saved my ass on several occasions.

 

In this day and age, if you are still using FTP to deploy a site, you're doing it wrong!

 

Also, if you're going to use Git, I highly recommend that you start learning by only using the command line. Don't touch GUI stuff. GUI tools are great for making simple commits, and making simple pushes. Sometimes merging is smooth, depending on the tool. But, when you need to do something complicated, or when something bad happens, they just get in the way or simply can't handle it - in my experience anyway. You can use GUI tools later once you are comfortable with the command line, just to make it easy on yourself. This is what I do, I use PHPStorm's Git integration tools for most things these days. The diff viewer and merger is really nice.

  • Like 2

Git is definitely the way to go. I was a hardcore SVN fan for a long time until I actually tried Git and figured out how easy it is to branch, merge, stash, etc. I've found SourceTree to be a great (admittedly GUI-based) tool, especially in conjunction with BitBucket, which allow you unlimited free private repositories for up to five users.

  • Like 1
  • 2 weeks later...

Thank you guys SO MUCH for your help and for being so nice to explain the Git stuff ! Unfortunately my hosting doesn't support Git, however I will start to study it ( for now I only know as much as to publish and commit repositories in GitHub ) and I will try to kick FTP and use Version Control.

 

Thank you again to all of you!

You can use a service like Beanstalk to deploy to hosting that don't support Git. Basically, Beanstalk hosts your repository and then when you push, Beanstalk will use one of many deployment methods to send your code on to your server. You can tell it to automatically FTP your changes whenever you push.

 

It's not free, though. There may be some that are, I'm not sure.

  • Like 1
  • 2 weeks later...

Thank you guys SO MUCH for your help and for being so nice to explain the Git stuff ! Unfortunately my hosting doesn't support Git, however I will start to study it ( for now I only know as much as to publish and commit repositories in GitHub ) and I will try to kick FTP and use Version Control.

 

Thank you again to all of you!

Start by installing on your workstation and using git for your development work. You can also set up a free account on bitbucket, that will allow you to make private repositories. You can utilize it as a free backup.

 

-Develop locally, git commit your code each time you have a working build

-Git push to your bitbucket remote

 

 

Doing this will get you started and familiar with git as well as giving you the benefit of having change control of your projects. Many a person has accidentally deleted or overwritten an important file. Git will bail you out on those mistakes. It also helps you diff so you can see what you changed revision to revision.

  • Like 1

Although it's worth mentioning that if you're willing to spend $15/month for Beanstalk, you could just buy better hosting. DigitalOcean has $5/mo VPS's that are excellent.

 

Good idea,  but I am scared of VPS-es, I am not a good network admin. I will probably screw up the installation of PHP totally ...

Start by installing on your workstation and using git for your development work. You can also set up a free account on bitbucket, that will allow you to make private repositories. You can utilize it as a free backup.

 

-Develop locally, git commit your code each time you have a working build

-Git push to your bitbucket remote

 

 

Doing this will get you started and familiar with git as well as giving you the benefit of having change control of your projects. Many a person has accidentally deleted or overwritten an important file. Git will bail you out on those mistakes. It also helps you diff so you can see what you changed revision to revision.

 

Will do so, asap. I counted on CTRL + Z, but you are right, because my projects have gotten bigger and even tho I upload them to the cloud every evening for back-up, it's not the same as have VC.

 

I have been wanting to learn Git for a long time anyways and you and scootstah have given me another very good reason to do so, thank you guys :)

 

PS - good idea also for the back-up in Bitbucket didn't think of that, lol.

  • Like 1
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.