On Wednesday, 5 August 2020 at 23:15:49 UTC+10 rhkr...@gmail.com wrote:

> On Tuesday, August 04, 2020 10:34:59 PM SJW wrote: 
> > I am trying to find a good way to track changes to the db but havn't got 
> it 
> > down pat yet. 
> > 
> > What I am doing 
> > 
> > ``` 
> > git branch feature 
> > git checkout feature 
> > ``` 
> > 
> > modify code and add/modify database tables 
> > ... 
> > create a txt file called feature.txt and list changes. e.g. DB ALTER 
> > statements etc. that I need to apply to staging and production db's 
>
> Interesting puzzle ;-) 
>
> Do you create one file named feature.txt, or do you create a different 
> file for 
> each feature with a unique name? 
>
> (I'm trying to understand "all these text files" from below.) 
>
> One thing I'd consider is just having one file named feature.txt, or 
> notes.txt 
> and modify that as appropriate and commit it with each change. 
>
> Then when you checkout a feature branch, you get the notes (DB ALTER 
> statements) associated with that feature, and it stays associated with 
> that 
> feature branch. 
>
> You could choose another name for the text file, perhaps: db_alter.txt 
>
>  
I have a different file for each feature - problem is, when I merge the 
feature and delete the branch, the notes get merged so if I have 5 feature 
branchs, I end up with 5 rogue feature.txt files  

I started with just database.sql and I would export the structure on each 
environment and then just compare but when I started using git push, the 
compare became redundant  
 

>
> > ... 
> > 
> > ``` 
> > git add . 
> > git commit -m "Message" 
> > git checkout staging 
> > git merge feature 
> > git checkout master 
> > git merge feature 
> > ``` 
> > 
> > Problem I have is that I have all these txt files that are just notes so 
> I 
> > delete them but they keep reappearing ( because I merged them into 
> master 
> > and then create new branch etc. ) 
> > 
> > I found this was a bit annoying so I stopped adding and committing the 
> txt 
> > files but now I have these txt files sitting in the unstaged changes 
> area 
> > of all projects - not a great idea either. 
> > 
> > Any suggestions on how to better manage these notes and somehow ensure 
> they 
> > remain linked to each feature branch? 
> > 
> > Thanks 
>

 

-- 
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/dd9db861-ad67-4609-a9f3-7057cbc3afd1n%40googlegroups.com.

Reply via email to