Is there a way to have Visual Studio 2010 automatically commit a file and push it to a git repository when the file is saved?
I would like to be able to have a pop up box appear to allow me to write the commit message on save. I feel that this would force some good habits on me, because sadly I can miss a day or ten of commits on occasion and as I am the sole developer this isn't a job requirement here.
From a configuration manager point of view I completely disagree with your "always commit" policy.
Insted, I don't know if have you tried Visual Local History 2005. I've used it in the 2005 and 2008 versions, but I've never tried with the 2010 version. It simply create a subdirectory and save there a local copy every save you make. So you could watch the history per-file.
THEN you could commit at the right point (when it really makes sense).
Let me know if it works as you would.
Related
I had about 20 files pending changes in my solution in Visual Studio 2015,I had a problem with repository so clicked on "Undo pending changes" thought I had already had shelved my changes. After undoing pending changes I noticed that I hadn't created any shelveset of those change.
I googled a bit about it and I found this link How can I get my changes back after clicking “Undo pending changes…” in Visual Studio 2013 and TFS
I tried the solution mentioned in answers of link above but there is no TFSTemp folder in my AppData\Local\Temp folder do notice that I'm using Visual Studio 2015 but the user asked this question is using Visual Studio 2013. Maybe vs 2015 store TFSTemp in different location but where ???
Any Idea about how I can get my changes back???
Any help would be greatly appreciated
The TFS Temp folder should be the same path "AppData\Local\Temp\TFSTemp". It's not related to VS version. If you could not find it in your own account, give a try with Admin account (If the VS run in Admin mode)
You should be checking in frequently or setup some sort of backup system to avoid mistakes like this. If the files are gone from your file system, they're gone. Maybe a file recovery utility could do the trick, but the solution is too complicated. Besides past that, there's no way to get them back.
I am trying to get new changes from my fork on GitHub. I have the solution open in Visual Studio 2015 and I am using GitHub extensions for Visual Studio. I am getting a message to commit my changes or undo them. I don't know what these changes are and I want to undo them. How do I find them and undo them?
I don't see entries in outgoing commits. The Output window is empty.
Git forbids most operations when there are uncommitted changes in your repository. This simply prevents data loss.
You can find all uncommitted changes in the Team Explorer - Changes
There you can Undo all your changes.
I am working on visual studio 2010.
I have done some changes in files and then I have closed the visual studio.
But now I want to restore the project, means I want to undo the previous changes.
lets say first version is version1 after changes this it becomes version2. I save these changes and close the visual studio. now I want version1 instead of version2.
So is there any way to restore the project in visual studio or on the basis of history I can get the the old project.
Please help me how can I solve this issue.
Unless your code in under version control: nope, there is not!
It's too late now, but setting up a git repository on your local machine is very easy (see this SO answer) and will save you that kind of problems in the future.
So when I try to do git add git doesn't include it because it thinks it is unmodified. But just 10 seconds before, I modified it in visual studio C# 2010 express and saved it. Although git still thinks it is unmodified. But if I edit it with notepad++(I'm sure any other program would work too) it will add it to the list and commit it. SO is there an option in visual studio or git? This is really annoying as it also includes the compiled dll which I can't edit.
Thanks in advance.
One way to work around that is to install the Git Source Control Provider, which will be mmore aware of any file modification with a solution.
Its pending change view should be accurate.
I have some questions regarding TFS 2010 please:
1- Where the pending changes are stored when using TFS 2010 (When you make changes to a file and close Visual studio without checking it in where these changes stored)
I beleive they are are not stored in the workspace.
2- When youopen Visual Studio and open the file from the workspace the changes appear in the file.
I am so confused about that. Can someone explain to me how this works please?
Thanks.
When you make changes without checking in, the modifications are stored locally but the file is flagged as "modified by" on the tfs. If you want to store the modifcations on the server without checking in you can use the shelving functionality.