Click here to Skip to main content
15,892,059 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Git Source Control Pin
MarkTJohnson28-Apr-20 8:08
professionalMarkTJohnson28-Apr-20 8:08 
GeneralRe: Git Source Control Pin
Andre_Prellwitz29-Apr-20 7:39
Andre_Prellwitz29-Apr-20 7:39 
GeneralRe: Git Source Control Pin
Kent Sharkey28-Apr-20 7:25
staffKent Sharkey28-Apr-20 7:25 
GeneralRe: Git Source Control Pin
GuyThiebaut28-Apr-20 7:33
professionalGuyThiebaut28-Apr-20 7:33 
GeneralRe: Git Source Control Pin
OriginalGriff28-Apr-20 8:34
mveOriginalGriff28-Apr-20 8:34 
GeneralRe: Git Source Control Pin
pkfox28-Apr-20 9:17
professionalpkfox28-Apr-20 9:17 
GeneralRe: Git Source Control Pin
RickZeeland28-Apr-20 8:51
mveRickZeeland28-Apr-20 8:51 
GeneralRe: Git Source Control Pin
raddevus28-Apr-20 9:18
mvaraddevus28-Apr-20 9:18 
Here's the skinny.

Git Local Repo On Windows
1. Get Git Bash at : https://git-scm.com/downloads
[^]

Yes, this is official git.

2. After installing, you open a Git Bash console window.

3. Navigate to your main project directory and type
c:\MainProject>git init


EDIT -- navigating there in git bash a bit different... it'll be like <code>cd /c/MainProject/ a bit different if you're accustomed to DOS/Windows. It's case sensitive.

4. That creates a repo.

5. copy the following .gitignore for Visual Studio (and WPF)[^] and create a text file in c:\MainProject> directory named .gitignore and save that text. This will create an ignore file so that git will ignore the stuff that shouldn't be in the repo.

6. Run
c:\MainProject>git add .
(git add dot) This will add all of the correct files (including the .gitignore) to your repo for tracking.

7.
c:\MainProject> git commit -a -m "This is the initial commit for this project"

Commits the files the first time. Now your changes will be tracked.

8. Next time you change a source file, try
c:\MainProject\>git status


that will show you the files that have been changed.

9. Then do
c:\MainProject>git diff


Will show you changes in the file

Git bash is like linux bash running in windows so ls -al etc works.

Git Remote
Sign up for GitHub account at GitHub.com and then there are some commands you can use to push your changes up. A little more details than can be added here, but very cool. You can keep everything in alignment no matter what machine you are working on.
GeneralRe: Git Source Control Pin
Jacquers28-Apr-20 19:03
Jacquers28-Apr-20 19:03 
GeneralRe: Git Source Control Pin
Peter Adam28-Apr-20 21:55
professionalPeter Adam28-Apr-20 21:55 
GeneralRe: Git Source Control Pin
Sander Rossel28-Apr-20 22:23
professionalSander Rossel28-Apr-20 22:23 
GeneralRe: Git Source Control Pin
PhilipOakley29-Apr-20 1:14
professionalPhilipOakley29-Apr-20 1:14 
GeneralRe: Git Source Control Pin
Sander Rossel29-Apr-20 1:32
professionalSander Rossel29-Apr-20 1:32 
GeneralRe: Git Source Control Pin
Davyd McColl29-Apr-20 0:30
Davyd McColl29-Apr-20 0:30 
GeneralRe: Git Source Control Pin
Member 11032329-Apr-20 4:12
Member 11032329-Apr-20 4:12 
GeneralRe: Git Source Control Pin
MikeTheFid29-Apr-20 5:54
MikeTheFid29-Apr-20 5:54 
GeneralRe: Git Source Control Pin
Kirk Hawley30-Apr-20 9:12
professionalKirk Hawley30-Apr-20 9:12 
JokeToo Soon? Pin
ZurdoDev28-Apr-20 6:19
professionalZurdoDev28-Apr-20 6:19 
GeneralRe: Too Soon? PinPopular
DRHuff28-Apr-20 6:22
DRHuff28-Apr-20 6:22 
GeneralRe: Too Soon? Pin
ZurdoDev28-Apr-20 6:25
professionalZurdoDev28-Apr-20 6:25 
GeneralRe: Too Soon? Pin
OriginalGriff28-Apr-20 6:56
mveOriginalGriff28-Apr-20 6:56 
GeneralRe: Too Soon? Pin
Mike Hankey28-Apr-20 7:26
mveMike Hankey28-Apr-20 7:26 
JokeRe: Too Soon? Pin
Cp-Coder28-Apr-20 8:55
Cp-Coder28-Apr-20 8:55 
GeneralRe: Too Soon? Pin
Mike Hankey28-Apr-20 8:57
mveMike Hankey28-Apr-20 8:57 
GeneralWhat happened to Mark Wallace Pin
Dan Neely28-Apr-20 5:17
Dan Neely28-Apr-20 5:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.