Creating a New Local Repository
How do I create a new Git repository on my machine?
Transcript
Today, I’ll show you how to create a new repository on your computer.
You’ll typically do this when (or after) starting a new project on your local computer. To begin with version control for this project, you create a new Git repository.
In Tower, you first navigate to the “Repositories” view. Here, you click the “Create” button and select the root folder of your new project. This will create an empty Git repository in that folder.
When you double-click that new item to open this repository in Tower, you see that it’s really empty: no initial revision or something like that has been created.
The only thing that has changed is that there’s now a new “.git” folder in the your project. If you have configured your file browser to show hidden files, you’ll see this “.git” folder. This is the local Git repository that we just initialized.
You don’t need to interact directly with the contents of that folder. This is all left to Git and Tower. It’s just nice to know it’s there.
Congratulations to your brand new repository! In the following videos, we’ll start working with it!
Course outlineEpisode 4 of 24
- What is Version Control?
- Installing and Configuring Git
- A Basic Workflow of Version Control
- Creating a New Local Repository
- Cloning an Existing Repository
- Inspecting Local Changes
- Staging & Committing Changes
- Commit History
- Ignoring Files
- An Introduction to Branches
- Creating & Checking Out Branches
- Merging Branches
- Stashing Changes
- Dealing with Merge Conflicts
- Undoing Things
- Tags
- Introduction to Remote Repositories
- Connecting a Remote Repository
- Sharing Data on a Remote Repository
- Publishing a Local Repository on Remote
- Pushing Changes to a Remote
- Pulling & Fetching Changes
- Rebase as an Alternative to Merge
- Branching Workflows