[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Got a question about version control. Is there any point in using

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 19
Thread images: 1

File: revisioning.png (12KB, 170x417px) Image search: [Google]
revisioning.png
12KB, 170x417px
Got a question about version control. Is there any point in using git or SVN if I'm working on a project on my own and need to change code rapidly/be able to test different things all the time? I find that system just gets in the way especially when you want to compare different versions or just get a piece of code. So I just use different files in different folders, using my directory structure as a kind of repo that I can easily access. My project isn't big enough that I have to copy a lot of directories.

Is this retarded or should I use VCS? Is there an effective graphical way to use VCS systems on Linux? Command line is a pain in the ass for browsing code.
>>
For one person it's often easier just to save different versions in different folders, but it's a good practice to use git just because one day you might want to expand your Dev team...

And unless you use an IDE (which usually have VCS support integrated), it's really easier just to use it from the command line. I mean the only things you need are git add <file>, git commit -m <comment>, and git checkout...
>>
>>60689270
>git add <file>, git commit -m <comment>, and git checkout...

That's easy if you want to just send stuff into the void, but what I'm talking about is actually working with previous versions. I mean what's the point of storing old versions if you're not going to use them?

Can someone show me a quick scenario of how that might happen?

Say I have my_file.py, I realize I fucked up and want to get something out a previous commit (without losing my current file), what do I do?

Or say I want to make my_file_for_different_case.py, how do I integrate that in git? Is it just a branch?
>>
>>60689239
>Is there any point in using git or SVN if I'm working on a project on my own and need to change code rapidly/be able to test different things all the time?
Yes, use git branches for this.
>>
>>60689321
>Say I have my_file.py, I realize I fucked up and want to get something out a previous commit (without losing my current file), what do I do?
Git stash, git checkout, git stash pop and merge.
>>
>>60689917

How do I specify the version

Or even find the one that has the stuff I'm interested in

This shit is so much easier to manage with a graphical interface, where is one?
>>
>>60689987
>How do I specify the version
git checkout <hash>

>Or even find the one that has the stuff I'm interested in
git log

>This shit is so much easier to manage with a graphical interface, where is one?
gitk is a commonly used one, and most IDEs have their own built-in ones, but I would honestly recommend just learning the command line commands.
>>
>>60690013
>git log

Doesn't this just show you the commit comments?

I'm talking about searching through code
>>
>>60690249
>Doesn't this just show you the commit comments?
Yes, write fucking sensible commit messages.

>I'm talking about searching through code
Not possible without checking out each individual commit.
>>
>>60689878
>>60689917

Example workflows?
>>
>>60690257
>Not possible without checking out each individual commit.

Okay, thank you for your straightforward answer.
>>
>>60690272
However, if you know what you're looking for, you can use git diff to see differences between two (or more) commits without having to check them out.
>>
>>60689239
I use git on my web projects to jump from development to production, i have a web server on my developer machine and other in the server, i test the code on my machine and when is ready i push it to the remote server with through SSH, if something didn't work on the server that did on my PC i roll back that repository while i fix the one on my PC.
>>
Source Tree with Beyond Compare makes it so easy to compare differences.
>>
>>60690299
>running git on your public facing production machine
Iiiih, huge security risk desu.
>>
>>60689239
You don't need the GUI bro. You just need to use git and learn it. Do everything you need with about a half dozen commands and you are done.
>>
>>60690319
Not sure how insecure it is but i followed this guide http://toroid.org/git-website-howto

Also the push is done through SSH and with a key file, i disabled password logins on the sshd_config and you can only connect with a local IP, finally the firewall has only 3 open ports, 2 for the webserver and 1 for SSH to a RPi3 on another subnet.
>>
>>60690249
>I'm talking about searching through code
git blame ? git show ?
>>
>>60690257
"git log -G<regex goes here>" will find commits whose patch text matches the regex provided.
Thread posts: 19
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.