Thanks, Magnus!

I'll keep the "git export" idea in my back pocket, in case the clone option 
proves problematic.

On Saturday, February 26, 2022 at 3:10:53 AM UTC-5 Magnus Therning wrote:

>
> Ken Winter <k...@sunward.org> writes:
>
> > I've written a web app named sched. Code is on my server in two 
> > repositories: development and production.
> >
> > I also have a sched repository on github, with two branches: 
> > master and develop.
> >
> > The workflow for moving changes from development to production 
> > has three steps:
> >
> > 1 On my server, push from development repo to develop branch of 
> > github repo.
> > 2 On github, pull from develop to master.
> > 3 On my server, pull from master branch of the github repo to 
> > production repo.
> >
> > The rules of the game are that code is changed only in 
> > development, never in production. But I've occasionally broken 
> > the rules and made an emergency fix in production. I've gotten 
> > by with this process for several years, though sometimes I've 
> > had to do tricks such as caching my emergency fixes in order to 
> > get step 3 (above) to work.
> >
> > But now, it seems, my sins have caught up with me. To make a 
> > long story short, when I try to do the pull in step 3, it fails, 
> > with many reported problems that are beyond my newbie skill set 
> > to fix.
> >
> > So, my most urgent question is: Would it be safe to just delete 
> > the whole production directory (including the get repo files), 
> > and then git-clone the master branch of the github repo onto my 
> > server, where it would be the new production instance?
> >
> > If not, got any other suggestions?
>
> Yes, that should, as you already found out, work just fine.
>
> A suggestion would be to look into other ways of deploying. A 
> simple one I've used is `git export` piped into `rsync`. Basically 
> anything that helps me not fall for the "oh, but it's so simple, 
> I'll do it only this once" :)
>
> /M
>
> --
> Magnus Therning OpenPGP: 0x927912051716CE39
> email: mag...@therning.org
> @mag...@mastodon.technology http://magnus.therning.org/
>
> I am always doing that which I cannot do, in order that I may 
> learn
> how to do it.
> — Pablo Picasso
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/d4a870d7-20de-4e45-a9ba-46bc751db3e0n%40googlegroups.com.

Reply via email to