I have just started using git recently. I am having an issue with viewing my changed files in the git commit tool. I am using visual studio as my development environment. I have couple of projects as localhost and localhost/admin. I did some changes to the files in the both the projects. When I run the git commit tool I can see the changes from the localhost project but cannot see the changes from the localhost/admin project. Any idea why it is behaving like that?
Thanks
If there are no changes displayed, means that they were not commited.
Possible reasons for that:
1) These are new files and you need to add them to commit separately
2) Files are ignored by git due to .gitignore rules
I would suggest:
1) Use gitk tool to verify what was commited previously. This tool is included in standard git package.
2) Use external tool to do commits (i am not sure how good VS git plugin, but that could help a lot). In my list of personal preferences is git-cola tool. It can let you choose what exactly will go to commit (even by lines of code)
My other project was redirecting to a different path in IIS.
Related
I'm new to Git. I work in Visual Studio.
Solution
- Phone App, refs Orange and Cabbage
- Shared Lib Orange
- Shared Lib Strawberry
- Shared Lib Cabbage, refs Strawberry
Each of these should be in different repositories. I'd like the shared libs to trigger builds on TeamCity that publish them on NuGet so my other apps update from the feed when they're built next.
Is there a special way to manage this in Git or shall I just pull them all into the App solution and run a batch file to commit them all together?
I have yysun's Git add-in installed in the VS IDE but it only controls the app's repo, so I will have to setup a macro or pin a taskbar button to commit on all repos.
My question is this: considering the normal everyday-ness of this arrangement, is there not some simple setup I can do in Git to support this without having to spend 20% of my programming day issuing DOS commands in the right order?
Seems like git submodules could be a good solution.
You might want to check out Using Git with Visual Studio.
Also, if your workflow lets you deal with only the Git-tracked files (at least most of the time), then git commit -a will stage & commit all Git-tracked files in the repo at once, thereby reducing your commit for each repo down to a single, repeatable command-line command.
I'm new to iOS developing, I haven't used earlier versions of XCode.
Yet I have stored my project on my local hd. Now I want to use some online subversion service.
I cannot seem to find the appropriate options in XCode. The hints that I googled all refer to a menu called SCM which I don't seem to have.
I created a new and empty repository online (webbased) and tried to configure XCode to use it by selecting the "Connect to a repository" menu when xcode starts. After some tweeking in the command line this "connect to a repository" succeeded but afterwards XCode simply closed itself again.
I tried copying the files that belong to my project to the path that I set up to be used with SVN manually. I opened the project in XCode from that path and after adding another file wanted to commit that change but couldn't find how to do that from within XCode.
Now I found that in XCode / Organizer / Repositories / MyProject is listed but has the type "GIT", which is wrong.
Do I have to change the repository type to SVN instead of GIT? If so, how can I?
When you created the project there was an option to put the project under source control. This option creates a git repository and is checked by default.
To use SVN you have to import your project into the SVN repository. (And you probably don't want it to be under git and svn at the same time, so you'll either delete the .git folder or recreate your project without the scm option selected.) Once the project is imported into your repository then you make sure Xcode knows about the repository and you can check the project out.
But really I'd recommend just using Git. It's a modern version control system with lots of nice features (though to do much of anything out of the ordinary requires using the command line) and there are nice project hosting sites for it like GitHub. I don't think SVN compares very well to git.
I was using "Tortoisesvn" to take control of my programs's source code. But sometimes, I had problems/bugs while using it. So I decided to use "git"( http://code.google.com/p/msysgit/ ) Also, I'm using git with "Git Source Control Provider" visual studio plugin. Source control is very easy with this extension.
So now I have few noob questions...
1) Where is the main repository? Where is the folder that my project's files backup?
2) Is this program working completely offline? I mean how secure is that? Are there any changes that someone can steal your files( repository/source codes etc. ) ?
Thanks for any input*
Best Regards,
Git is different from SVN in that Git is a DVCS - Distributed Version Control System. That means every "working copy" is a full blown repo. Repos can talk to themselves and there is no need for a main repository ( but usually there is a main or "blessed" repo that is the central.)
So when you created a Git "working copy", you created a repo. You setup another repo on different maching / server and push to it if needed.
I don't know what you mean by "backup", but the metadate for git will be under the .git folder ( it will be hidden unless you have selected to show hidden files and folders in Explorer)
Another feature of DVCS that results from having full blown repos and no main repos is that it works offline. You get full history and you can commit without contacting any server etc. Again, I don't understand why you would ask about security in this context? If it is offline, wouldn't that be the most secure? And Git has lots of security and integrity mechanisms.
Git doesn't work with a centralized "main" repository. Each repo is considered an equal to every other repo.
Git can work completely offline (unlike some other source control systems), but in order to push changes to other repositories you'll of course need to be connected in some way to the machine where the remote repo is hosted.
I am a complete noob to this so if there is a completely obvious answer by all means make fun and point and laugh then give the answer.
We use Visual Studio 2010 to compile our published website. I have a repository that I use for my source code and one which I publish the compiled code to. I then check out the publish repository on the testing server and once it tests good I check out the repository on my main server. This is fine and all but I am using Tortoise SVN and automating the commit. Problem is, I really need to wipe the publish SVN repository, then copy the files, then commit. I just can't get that to happen and have it still recognize it as a SVN repository. Suggestions?
First of all, don't put compiled code into your source repository. It's bad form.
Look at Jenkins as a build server. Jenkins can use the msbuild.exe command to build .NET projects using the .sln file your project creates.
When you do a commit in Subversion, Jenkins will automatically fire off the build. If you have NUnit tests, Jenkins will run those and give you the results. You can have Jenkins store the compiled files for you in its archive. If someone wants to install a particular build, they can directly download it from Jenkins without having to do a checkout in Subversion first.
Jenkins offer all of these advantages:
It shows you all the changes in your repository and what changed in each commit.
It can run all sorts of tests automatically for you.
You can mark builds that are released using the "Simple Promotion" plugin.
You can tag builds in Subversion directly in Jenkins without needing a command line or working directory.
It can alert the developers if a build fails due to bad code, or if testing fails. These alerts can be done via Email, instant messaging, phone text messages, Twitter, and many other ways. All it takes is the right plugin which Jenkins makes easy to install.
Jenkins can act as a release repository which makes it easy to find the release, what's in the release and why.
Jenkins integrates with Bamboo, ViewVC, and Sventon. These are web-based repository browsers. This way Jenkins not only shows you the file changed, but what changed in the file.
Jenkins is easy to use and install. Download it and give it a try.
Unless you have a hard and fast requirement which forces you to use two separate repositories, i'd suggest taking a look at SVN tagging and branching functionality.
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-branchtag.html
Having a repository for the published code really doesn't buy you anything. IMO, you would be better off with a bunch of zip files (one per release) with the date and SVN branch reflected in the name. DO have a changelog .txt file in the zip, and also check that into the repo.
Problem is, I really need to wipe the publish SVN repository, then copy the files, then commit.
You don't need wiping in repo. Just make commit to production repo with exported HEAD from dev-repo (post-commit hook for commit message)
And tags, yes, are more natural and bulletproof way.
How do I add an external git repo (such as code.google.com) to Xcode with my project. All I am able to get is to add in the repo, but not use it with any projects. I have been trying the command line options from various websites with no success.
I find XCode has rather rudimentary SCM support. Do yourself a favour and use either the command line or a GUI client, you'll save headaches when things go wrong and the built in client with xcode doesn't always reveal things. Xcode is happy to look at the .git files or .svn files and tell if the status which is useful, but that's as far as I let it go.
Xcode will create and manage the repository for you locally, but you will need to push your commits using the command line.
I've been using it with GitHub, and ran into no issues so far.
Once you push your repo to the web server, all the local commits will sync and upload.
SourceTree is excellent, I use it and the CLI
http://itunes.apple.com/us/app/sourcetree-git-hg/id411678673?mt=12