You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mac/set-up-git-repository.md
+32-5Lines changed: 32 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,10 @@ There are many remote hosts that allow you to work with Git for version control,
16
16
17
17
If you wish to use GitHub, ensure that you have an account created and configured before following the steps below.
18
18
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
+
19
23
To set up a Git repository, execute the following steps:
20
24
21
25
1. Create a new Git repo at github.com:
@@ -31,13 +35,16 @@ To set up a Git repository, execute the following steps:
31
35

32
36
You will need the HTTPS address to point Visual Studio for Mac to this repo.
33
37
38
+
39
+
## Publishing an existing project
40
+
34
41
4. Return to your open Project in Visual Studio for Mac.
35
42
36
-
5. In the Menu bar, select **Version Control > Checkout**:
43
+
5. In the Menu bar, select **Version Control > Publish in Version Control…**:
37
44
38
45

39
46
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:
41
48
42
49

43
50
@@ -59,10 +66,30 @@ To set up a Git repository, execute the following steps:
59
66
60
67

61
68
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:
63
70
64
71

65
72
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
+

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
+

82
+
83
+
## Troubleshooting
84
+
85
+
If you have issues with initalizing your project with an empty remote repository, you can try the following steps:
67
86
68
-

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