Reputation: 440
Using GiT I created an empty folder, opened a GiT bash at that location and entered
git init
I see that GiT creates a hidden .git dir like other VCs do. Then I created file readme.txt and added it:
git add readme.txt -m "adding readme.txt"
Then I thought - "where am I committing my changes to? I haven't designated a local repo or a remote one. This is very disorienting. Can I keep making changes and work locally without ever creating a distributed repository? Or, have I just created that repository locally and each instance of it is a clone of it?
Upvotes: 0
Views: 33
Reputation: 680
You can find out what branch your on with "git status" you can bring up a GUI of your git history with "gitk".
"git add" doesn't commit anything it just stages it.
To commit you use "git commit"
"Can I keep making changes and work locally without ever creating a distributed repository?" - YES
Upvotes: 0
Reputation: 1361
You don't necessarily need to create a distributed repository. Git is cool like that. It's very flexible. Later on, when you are ready, you can push the changes in this repository to a remote repository. Feel free to work locally for now.
Use the Git-SCM documentation to get you started. It is what helped me immensely when learning this technology.
Upvotes: 3