Vault7: CIA Hacking Tools Revealed
Navigation: » Directory » Git Distributed Version Control » Git Distributed Version Control Home » Git Tutorials
Owner: User #1179751
Git For Visual Studio Users
As an essentially new Git user (and a lazy one, who prefers using GUIs over CLIs), I've found that the following workflow seemed to be the easiest one to pick up:
Prerequisites – install Visual Studio, install and set up Git Extensions: |
---|
|
Project Setup – create a new project on the EDGEngineering Development Branch Stash server, and clone the repository locally: |
---|
|
Preparing your first commit – setting up your ".gitignore" file: |
---|
So you've got some code written? Excellent! Let's get your repository set up to receive it.
|
Executing a commit – staging files and committing them to the repository: |
---|
It's important to remember that Git makes a distinction between "staged" and "unstaged" files. For example, maybe you modified 20 files in your project, but you only want to commit 10 of them. Git allows you to check in only the subset you're interested in – this process is called "staging" files before a commit.
|
Comments:
-
2013-12-05 11:04 [User #524297]:
Great stuff User #?, keep it coming.
My only suggestion, regarding:
As for me, at the moment I'm the only developer on this project. So yes, I will push my changes up to the Stash server
This way of thought seems like it might be true, but a better way to distinguish the two is to think of
git commit
as "tracking the changes", andgit push
as "publishing the changes". Sometimes, your changes that you track might not be ready for prime time public consumption, but you still want to track them locally. Typically developers will take the opportunity to polish ongoing changes locally, running tests and so forth, before publishing (e.g. usinggit rebase
). The thing is, once you publish your changes, you can't (easily) make those polishing changes anymore... the genie is out of the bottle, and you're trying to rewrite history.Now, given that your [Klaxon project on Stash is not readable by others (*cough* you should change this), you can probably make these edits anyway without too much concern.
Additionally, I recommend to everyone starting in Git that they not do active development out of
master
. The articles at Git Workflows will really help outline some basic workflows on how to use Git for maximum effectiveness, solo or grouped.
Attachments:
-
Git Extensions, Klaxon commit dialog ('Commit', 'Push' buttons circled).png
-
Git Extensions, Klaxon commit dialog ('Commit message' circled).png
-
Git Extensions, Klaxon commit dialog ('Stage' button circled).png
-
Git extensions, Klaxon commit dialog ('ignore' context menu circled).png
-
Git extensions, base window ('Clone repository' circled).png