
Ensure the origin URLs point to your personal fork. View the configured values and confirm the URLs are correct. If you're using Git Credential Manager, use the following commands. You use the fetch command to refresh the branch info from the upstream repository. The git remote command is used to set the configuration value. You use the upstream URL to keep your local repository in sync with the latest changes made by others. You can explore the folder to see the structure once it is finished.Īfter cloning the repository, set up a read-only remote connection to the main repository named upstream. It may take a few minutes, depending on the repository size. A new folder is made within the current folder. The clone command runs and downloads a copy of the repository files from your fork into a new folder on the local disk. You only need to do this authentication once per computer. Your credentials will be saved and used to authenticate future GitHub requests. Cloning downloads (clone) the forked repository on your local computer. Run the clone command, by providing the repository name. Git Credential Manager makes authentication much easier because you don't need to recall your personal access token when re-establishing authenticated connections and remotes with GitHub.
GIT ADD REMOTE ON OTHER MACHINE WINDOWS
If you installed the latest version of Git for Windows and accepted the default installation, Git Credential Manager is enabled by default. Authenticate by using Git Credential Manager Using Git Bash, prepare to run the clone command to pull a copy of a repository (your fork) down to your device on the current directory. Note that Git Bash uses the Linux convention of forward-slashes instead of back-slashes for folder paths.įor example, cd /c/docs/ or cd ~/Documents/docs/ To determine the current directory, type pwd at the $ prompt.Ĭhange directory (cd) into the folder that you created for hosting the repository locally. The default location that Git Bash starts in is typically the home directory (~) or /c/users// on Windows OS. While it is acceptable to store the git cloned folders adjacent to each other, nesting git folders inside one another causes errors for the file tracking. For example, consider a root folder C:\docs\ or make a folder in your user profile directory ~/Documents/docs/Īvoid choosing a local folder path that is nested inside of another git repository folder location. Choose a location with available disk space.Ĭhoose a folder name should be easy for you to remember and type. Some of the repositories can be large up to 5 GB for azure-docs for example. Make a local folder to hold a copy of the repository locally. This prompt creates a copy of the repository within your GitHub account, known as a fork. If you are prompted, select your GitHub account tile as the destination where the fork should be created. Go to the main repository's GitHub page and click the Fork button on the upper right. To facilitate this process, you first need your own copy of the repository, in which you have write access. To make changes, you must submit a pull request from your fork into the main repository. Using the appropriate repository, create a fork of the repository into your own GitHub account by using the GitHub website.Ī personal fork is required since all main documentation repositories provide read-only access.

Note the URL to view the repository name.įor example, these popular repositories are available for public contributions: That link takes you to location for the corresponding Markdown file in the appropriate repository. Select the Edit link (pencil icon) on the upper right of the article. If you are unsure of which repository to use, then visit the article on Microsoft Learn using your web browser. Then you use pull requests to merge changes into the read-only central shared repository.ĭocumentation hosted at Microsoft Learn resides in several different repositories at. Microsoft requires you to fork the appropriate repository into your own GitHub account so that you have read/write permissions there to store your proposed changes.

To contribute to Microsoft's documentation site, you can make and edit Markdown files locally by cloning the corresponding documentation repository. You can continue directly to the quick changes workflow. If you're making only minor changes to an article, you do not need to complete the steps in this article.
