Skip to content

Commit 3733dad

Browse files
committed
Updating incorrect version control guide
1 parent e48ebca commit 3733dad

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

mac/media/version-control-git12.png

147 KB
Loading

mac/set-up-git-repository.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ There are many remote hosts that allow you to work with Git for version control,
1616

1717
If you wish to use GitHub, ensure that you have an account created and configured before following the steps below.
1818

19+
## Creating a remote repo on GitHub
20+
21+
The example below uses a GitHub host, but you can use any Git host for version control in Visual Studio for Mac.
22+
1923
To set up a Git repository, execute the following steps:
2024

2125
1. Create a new Git repo at github.com:
@@ -31,13 +35,16 @@ To set up a Git repository, execute the following steps:
3135
![view and copy address](media/version-control-git3.png)
3236
You will need the HTTPS address to point Visual Studio for Mac to this repo.
3337

38+
39+
## Publishing an existing project
40+
3441
4. Return to your open Project in Visual Studio for Mac.
3542

36-
5. In the Menu bar, select **Version Control > Checkout**:
43+
5. In the Menu bar, select **Version Control > Publish in Version Control…**:
3744

3845
![Start checkout in Visual Studio for Mac](media/version-control-git4-sml.png)
3946

40-
6. This will display the **Select Repository** dialog. Choose the **Registered Repositories** tab, and press the **Add** button:
47+
6. This will display the **Select Repository** dialog. Choose the **Registered Repositories** tab and press the **Add** button:
4148

4249
![](media/version-control-git5.png)
4350

@@ -59,10 +66,30 @@ To set up a Git repository, execute the following steps:
5966

6067
![Enter username and password for git](media/version-control-git9-sml.png)
6168

62-
12. After a few seconds, the Solution should be published. Confirm this by browsing the Version Control menu item, which should now be populated with many options:
69+
12. After a few seconds, the Solution should be published with its inital commit. Confirm this by browsing the Version Control menu item, which should now be populated with many options:
6370

6471
![Version Control Menu](media/version-control-git10.png)
6572

66-
13. Finally, select **Push Changes...** to push the changes to the **remote** repository. This will allow all appropriate users to view it on github.com: 
73+
13. Once you start to make additional changes select **Push Changes...** to push the changes to the **remote** repository. This will allow all appropriate users to view it on github.com: 
74+
75+
![Push Changes to remote repository](media/version-control-git11.png)
76+
77+
## Publishing a new project
78+
79+
The new project dialog can be used to publish a new project using git. To enable it, select the **Use git for version control.** checkbox, as illustrated in the following screenshot. This will initalize your repo and add an optional .gitignore file:
80+
81+
![Push Changes to remote repository](media/version-control-git12.png)
82+
83+
## Troubleshooting
84+
85+
If you have issues with initalizing your project with an empty remote repository, you can try the following steps:
6786

68-
![Push Changes to remote repository](media/version-control-git11.png)
87+
- Go to your solution folder.
88+
- Press `Command + Shift + . ` To show the hidden files and folders.
89+
- If there's a `.git` folder, delete it.
90+
- If there's a `gitignore` file, delete it.
91+
- Press `Command + Shift + . ` To hide the files and folders.
92+
- Open your solution in VS for Mac.
93+
- On the solution pad, select your solution node.
94+
- Browse to the Version Control menu and choose **Publish in Version Control**.
95+
- Follow the steps of the above tutorial starting from the step 6.

0 commit comments

Comments
 (0)