Redgate source control - how to tell which repository of a Git repo that the Db is linked to? - redgate

My team is using redgate source control for our databases with Git. I noticed that as I was looking at the database, it wasn't obvious which source control path eg. which branch it was linked to in SSMS. Where can I see this setting?
You can see the branch name when you start a commit, but where can I see the full path - because there several different Git repos that we use.
[update]
ok, nevermind, it has been a while since i had to use it. An "update" message hiding the source control menu across the top of the window in ssms. Once I clicked on my update and installed it, the source control menu was visible again. I was able to see the folder where branch pointed to.

Related

When I add a solution to source control in VS 2019 Azure Devops only the startup project gets added - how do I add the others?

I am working on a solution that has 14 projects (so far) in it. I added the solution to Azure Devops source control and can see that the solution and the startup project have the little locks in the solution explorer, also I can see the startup project files in the devops repo, but I can't see how to add the other projects. Obviously I messed up somewhere, since ideally the repo would contain a folder for the startup project rather than the files themselves, but I don't know how to "undo" the source control and reset my solution back to its original state.
Can someone tell me how to either fix the source control so that the master branch contains all of the projects in sub-folders (as per the visual studio folder structure) - i.e. how to move the startup project files in the devops repo to a sub-folder and how to add the other projects to their own sub-folders, or, failing that, how to undo the source control so that all of my solution files are back on my local hard disk?
Any advice will be appreciated.
You mentioned that you are using git. So when you DO NOT have local changes which are not pushed to your git server, that means everything is "synced".
Make a backup of your folder, just copy & paste everything!
You can just delete the .git folder. So you have no "link" to the git server anymore.
You can the link the "folder" again to your git server, with sth. like:
git remote add origin https://YOURNAME.visualstudio.com/YOURPROJECT.git
Other option is check your .gitignore file, maybe some of your projects are excluded.
When you are working with Visual Studio, can can also create a new empty solution and add the projects one by one. Also be sure that there is NO Filter in Project Explorer in Visual Studio.
You can also check your git changes, with git log or git status from any terminal or command line tool.

What Egit actions do I take to get copy of src file TESTGIT1 from MainServerRepository into LocalServerRepo to work on?

As a new Egit user, aiming to set up version control to update the way a team manages source code without changing locations of our build and dev servers and to identify correct Egit commands to use for check in and check out code from both servers.
In a single Eclipse workspace, initially had one project without use of Egit just a basic automatic and adhoc file copy back up of changed development directory into folders with dates of backup. Promotion to the build server was done by manually copying source files and binaries, doing a diff between source on the MainServer and local server to manage any merges. Now need to implement a proper version control system, using Egit, so as a first time Egit user. I have set up two test Eclipse projects in my workspace: project A shared with MainServerRepository and project B shared with LocalServerRepo. The two git repositories will be in different directories: MainServerRepository on the network and LocalServerRepo on my area on the network where I backup my PC.
What Egit actions do I take to promote latest TESTGIT1.src from MainServerRepository into LocalServerRepo to work on in my local server? (Team > Fetch from upstream is grayed out). Then, once tested, how do I check in src for TESTGIT1 into the main build server project, source and objects are in MainServerRepository?
I've used Team > Commit successfully to check in, but am using cut and paste to move code between two projects (prior to commit) and feel there must be a better way to do this or to set up the projects differently within Eclipse.
Or should I be using Team > push or Team > merge?
Do I need local repository or should I just check out into workspace?
Any comments/ question/assistance would be welcome as haven't figured it out from reading the EGit/User_Guide.
Edit TESTGIT1.src in Eclipse project shared with LocalServerRepo(testGitRepo) until work on it is complete on local server. Then, apply same changes to TESTGIT1 in the main build server project, using right click copy +paste from right click, team > check in. Then in Git Staging view, click plus sign to add to index (staging area), then click commit button, merging in with any other changes made to TESTGIT1.src by other developers. Don't use push command to push entire contents of LocalServerRepo. Or is there a better answer?

Visual Studio 2015 with github plugin issue

I'm new to using github with visual studio 2015 plugin and I'm stuck.
I created a new project on github and was able to link the depot to my visual studio project. I was able to sync some code up to the depot.
Then I added a readme file to my project on github from the website. Next day I made more code and decided to sync it up to the depot, but now it says that I have incoming commits (the readme file). I clicked on fetch on the incoming commit but nothing happens. I clicked on pull and it says my changes would be overwritten by merge.
I then went to outgoing commit (the ones i just made) and click on push. it says that "You cannot push branch master to remote origin because there are new commits in the remote repository’s branch. Pushing this branch would result in a non-fast-forward update on the branch in the remote repository"
i click on several things and i still can't resolve this issue. I want to update my current project with the readme and then update my depot. (i also am new to the terminology)
The trouble is that you've got changes on the server, that are committed, and changes to some of the same files on your local copy that conflict with it to the extent that Git can't figure out which ones should "win".
You'll have to look at each file that has conflicts, understand where the conflicts are, sort them out, tell git that you've sorted out the file, and then progress.
So Fetch will bring all of the changes down from github, locally, but not change your working copy.
Merge is intended to pull down the changes in your current branch and merge them in (and that's where it's having trouble).
Best recommendation for working with git (whether Visual Studio or not)): Fetch and merge often. Every day at least.
This page looks like a reasonable tutorial on how to do it. It looks similar to my VS2015 git plugins.
https://msdn.microsoft.com/en-us/library/dd286559.aspx
This page is quite a good tutorial on doing it from the command line:
https://easyengine.io/tutorials/git/git-resolve-merge-conflicts/
(But I've got to say: the Visual Studio tool makes it easier).
So the key points are:
look at each file and fix the conflicts.
tell git that you've fixed the file
Once you've done all the files, you need to "commit the merge"
Then you're in a place to commit your local changes and push them up to the server.
Second tip: Most people that I know who use git with visual studio also use the command line client extensively, and usually have an additional gui client (such as Atlassian's Sourcetree) as well. I use all three every day.

Is there a better way to keep your own copy of a customized open source project?

I use an open source project to host a site (OrchardCMS) which is available in a GIT repository via CodePlex. I have made a few customizations to the source code that are specific to my implementation and I want to keep preserved and under source control. However the challenge arises when there's a new release of the source engine.
My changes certainly won't go into the blessed repository everyone uses.
Currently I'm using two repositories. I use the CodePlex OrchardCMS repository to get the latest changes from the engine the community uses (and that I contribute some bug fixes to).
I then have my own copy which contains my changes. For this, I am using my own source control (hosted TFS from Microsoft). When an update to the core engine comes out, I XCOPY all the files from the current source to my self-maintained repository and commit them to my project.
However this seems like there should be a better option. Any opinions?
You can use git to have an alternative solution.
You can clone the git main repo and keep it updated with the new relases, and you can keep your local modifications, that aren't to be shared with anyone, on a local branch.
When a new release came out, you simply update your master branch in your git repo an then you can rebase or merge your local modications on top of it.

How to merge two versions of the same project in xcode?

My colleague and I work together on an iPhone app in Xcode. Now and then, we want to merge our work. Ideally, this should also work when we are offline and use a USB stick to exchange eachother's projects.
For the case the majority of the changes are non-conflicting, what way can I use to merge these two whole projects locally, and keeping the local GIT repository in sync with these merges?
To merge the changes into your version, you need to add your colleague's version as a remote repository (although stored locally on harddisk) to your project and then pull the changes from your colleague's project into your own project.
Details:
I'm assuming you have two copies of the same Xcode project, with different changes, on your local harddisk, yours and the one with the additional changes from your colleague that you want to merge into your own version.
Moreover, I'm assuming that both of you use a local GIT repository for local version control. That's the default when you start a new Xcode project, so unsually you don't need to worry about this.
Let's assume the project folders are in these locations:
/Users/UserName/projects/YourVersion
/Users/UserName/projects/YourColleaguesVersion
For adding your colleagues project as a remote repository to your project, do this:
Go to the Organizer (click in Xcode's Menu: Window > Organizer)
Click on Repositories at the top of the Organizer window
Locate YourVersion in the list at the left side of the Organizer window
Click on "Remotes" under YourVersion
Click on "Add Remote" at the bottom of the Organizer window
In the Dialog which appeared, type in this:
Remote Name: YourColleaguesVersion
Location: file:///Users/UserName/projects/YourColleaguesVersion
Click the "Create" button and close the Organizer window
Now for pulling the changes from your colleage's project into your project, do this:
Click in Xcode's Menu: File > Source Control > Pull...
A Dialog opens and says "Choose remote from which to pull changes." - It should show YourColleaguesVersion/master as the remote repository and it should say Remote is online. Click on the "Choose" button.
You're done.
This is what source control is for. You mention git, and that's a reasonable source control system to use. git is very good at branching and merging and makes it pretty easy. You should read the git book chapter on branching. It explains it pretty well.
There are a variety of ways you can do it, but if you both work on different computers, it seems like the easiest way is to have a git server that hosts the main repository. You can each branch and merge locally or from the server. You shouldn't need to share a memory stick, though you could theoretically keep a local git repository there and each have branches on it. But git was intended to be used by many people distributed in different places each making their own frequent branches and merging them back together.
I should add that you can start a git repository locally and later move it to a server if you don't have a server right now. You can also use something like github to store your project on a server without having your own server.