Can I use git to update if I didn't use git to install?

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
Larrypoppins
Bear Rating Trainee
Bear Rating Trainee
Posts: 26
Joined: 13 Apr 2013, 08:55

Can I use git to update if I didn't use git to install?

Postby Larrypoppins » 21 May 2013, 07:50

I've got just a basic idea of how git works, after reading some stuff and watching videos, but I haven't actually "used" it for anything besides "clone".

I also read the "using git with trunk" thread, or whatever it's called. That's all cool, but I don't think it answer my exact question.

So I installed tt-rss (shared dreamhost) using the official tt-rss install instructions. Been working fine. Updated to 1.7.9. No problems.

But what if I want to update my shit with new code? So far I have simply cut and pasted changes on github into the relevant files in my local install. But isn't that what git is for?

I may have missed this in another thread, but can I gitify my local install? Is that something? Then pull or merge changes from master? Is master the same as trunk? Are these questions good or stupid? Man, this stuff is crazy.

gbcox
Bear Rating Master
Bear Rating Master
Posts: 149
Joined: 25 Apr 2013, 04:52

Re: Can I use git to update if I didn't use git to install?

Postby gbcox » 21 May 2013, 08:47

Read the thread here:

viewtopic.php?f=10&t=1697

Basically, I think you need to clone first; after you clone then you can do a git pull to update.

You can't clone into an existing directory.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Can I use git to update if I didn't use git to install?

Postby fox » 21 May 2013, 09:17

Is it seriously that hard to google git tutorial or something?

Larrypoppins
Bear Rating Trainee
Bear Rating Trainee
Posts: 26
Joined: 13 Apr 2013, 08:55

Re: Can I use git to update if I didn't use git to install?

Postby Larrypoppins » 21 May 2013, 09:57

Okay, but I may be back!

atrus
Bear Rating Trainee
Bear Rating Trainee
Posts: 17
Joined: 19 Apr 2013, 20:03

Re: Can I use git to update if I didn't use git to install?

Postby atrus » 22 May 2013, 03:03

"You can't clone into an existing directory."

Can't is a strong word :)

IIRC what I did when I was in the same situation was to do a git init in my existing directory, run a 'git remote add <appropriate parameters>' to add the the github repository, and then a 'git reset --soft origin/remote/<appropriate branch for what I already had installed>'. (If branches/tags for the relevent release aren't available, you'd pick the sha1 for the commit that coincided with the release). That gets you to a point where it's very much as if you had been running from git all along, and any unstaged-changes/untracked-files are clearly something you've done yourself, or something that differed in the packaging.

That said, I don't recommend this route if you're not reasonably proficient in git, except possibly as a experiment or entertaining/educational experience. But I had fun with it, so...

owerg
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 28 Mar 2013, 18:57

Re: Can I use git to update if I didn't use git to install?

Postby owerg » 22 May 2013, 05:42

I moved from a manual install to git-based one a while back w/o ever using git before... Here's what I did, although I'm sure there's probably a better way.

1) Back up/move your current tt-rss dir.
2) Look at the other thread mentioned here/google git for a bit/mess around until you get it working in the location you want.
3) Copy config.php from your old tt-rss dir to the new one.
4) Open tt-rss in the browser and deal w/whatever errors show up on the main page until it's working again.

Then when you want to update, just do 'git pull' in the tt-rss dir.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 9 guests