Source control (using Git) does not commit newly created objects

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
wombatfish
Posts: 5
Joined: Fri 11 May 2018 13:59

Source control (using Git) does not commit newly created objects

Post by wombatfish » Fri 11 May 2018 15:34

I've configured the source control feature to use Git.
All works well when changing or removing existing objects in the database schema.

However new objects do not get committed into the repo.
Instead they are merely created in my working folder and seen as "Untracked" objects by Git.

Is there a setting I need to make in either Git or DbForge to force newly created objects to be committed into the repo?

I've included my .gitignore file contents below, in case something in there is the cause, but I don't think that's the case:


.vs/
#ignore obfuscation cruft
Obfuscated\ assemblies/
# Ignore User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# Ignore NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config

# Ignore Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/

# Ignore NUNIT
*.VisualState.xml
TestResult.xml

# Ignore Visual Studio profiler
*.psess
*.vsp
*.vspx

# Ignore ReSharper
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# Ignore DotCover
*.dotCover

# TeamCity
_TeamCity*

# Ignore Others
*.[Cc]ache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
publish/
*.lock
*.ide
*.tss

# Ignore backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# sass
.sass-cache/


*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# RedGate Source Control
*.ssc

alexa

Re: Source control (using Git) does not commit newly created objects

Post by alexa » Mon 14 May 2018 08:59

We will review this post and will answer you as soon as possible.

wombatfish
Posts: 5
Joined: Fri 11 May 2018 13:59

Re: Source control (using Git) does not commit newly created objects

Post by wombatfish » Mon 14 May 2018 12:51

Update (yet more problems):

Now I also find that when I run a schema comparison and sync changes from another server's schema into my own schema, it does not reflect these changes in the source control manager.

Perhaps I have set up the sc settings incorrectly?

I have a local clone repo which is being tracked by a remote repo.
In sc manager, I have configured the remote repo's login credentials and have also tried to use the existing local clone as the "target" of sc.
However the properties window of the sc repo "unchecks" the "use existing local clone" option....?
See attached pic (https://www.dropbox.com/s/u9dx20nkaap38 ... s.png?dl=0).

What do I need to do to configure sc to work with my setup?

alexa

Re: Source control (using Git) does not commit newly created objects

Post by alexa » Tue 15 May 2018 12:43

Could you please specify the full product name?

wombatfish
Posts: 5
Joined: Fri 11 May 2018 13:59

Re: Source control (using Git) does not commit newly created objects

Post by wombatfish » Wed 16 May 2018 13:46

dbForge Studio for SQL Server
Enterprise Edition v5.5.327

alexa

Re: Source control (using Git) does not commit newly created objects

Post by alexa » Fri 18 May 2018 20:16

Thank you for the reply.

We will investigate this issue and will answer you as soon as possible.

alexa

Re: Source control (using Git) does not commit newly created objects

Post by alexa » Tue 22 May 2018 16:29

All changes, including objects adding, should commit automatically.

Are you using 'Dedicated' or 'Shared' database development model?

When creating a link to a remote repository, dbForge creates its own clone. It can be viewed in the 'Source Folder' field of the 'Source Control Settings' dialog url=https://www.devart.com/dbforge/sql/stud ... rol_ui.htm
in my working folder
Were you using the 'Use existing local clone' option or linking to a local folder?

Are there any other untrecked files apart from *.sql ones?

Are there any errors in the 'Error List' dialog (select 'View -> Error List' from the main menu)?

Also, we would appreciate if you could provide us with more detailed steps to reproduce it.

wombatfish
Posts: 5
Joined: Fri 11 May 2018 13:59

Re: Source control (using Git) does not commit newly created objects

Post by wombatfish » Wed 23 May 2018 08:07

>> Are you using 'Dedicated' or 'Shared' database development model?
Dedicated

>> Were you using the 'Use existing local clone'
Yes

>> Are there any other untrecked files apart from *.sql ones?
No

>> Are there any errors in the 'Error List' dialog (select 'View -> Error List' from the main menu)?
Since I my posts, I have reverted to using the "Working folder" option to get back to work (this option works just fine).

In an effort to recreate the errors that happened earlier, I retraced my steps but then experienced a different behavior from DbForge:
1) Right click database in database explorer, select "Link Database to source control"
2) Select "Dedicated database development model"
3) Click "+" icon in "Source control repository" drop down
4) Choose Source control system: "Git"
5) Type in remote repository path (https://etc...), and type in under Security settings: HTTP login and password credentials (no client certificate is involved)
6) Clicked "Use existing local clone" checkbox, but....
Now my Remote repo settings have suddenly vanished and are replaced with "Using insecure connection" message.
In the past, they didn't vanish and I would have continued with the next step: clicking "three dots" and navigate to and select a (newly created by me) sub folder inside my existing repo on C: drive (e.g. C:\Users\admin\Documents\Visual Studio 2017\Projects\MyProject\TestDbForgeSqlSchemas)

Now I am unable to recreate what happened earlier because my remote repo is no longer active in the settings....

alexa

Re: Source control (using Git) does not commit newly created objects

Post by alexa » Tue 29 May 2018 18:02

We were not able to reproduce it.

After the step 6, please specify the path to the folder (or sub-folder in this folder) into which you were making a clone. This way, Security settings will display again.

wombatfish
Posts: 5
Joined: Fri 11 May 2018 13:59

Re: Source control (using Git) does not commit newly created objects

Post by wombatfish » Mon 04 Jun 2018 09:01

Yes, that did the trick.
Recreating the steps now seems to work for some reason.
Whatever the problem was, it's gone now.

Thanks for your time and feedback...

alexa

Re: Source control (using Git) does not commit newly created objects

Post by alexa » Mon 04 Jun 2018 14:40

Thank you for updating us on this issue. Please let us know if any questions arise.

Post Reply