![]() ![]() P圜harm will automatically set Git root mapping to the project root directory. If you want to create a project based on these sources, click Yes in the confirmation dialog. In the Directory field, enter the path to the folder where your local Git repository will be created. Select a repository from the list of all GitHub projects associated with your account and the organization that your account belongs to. If you have two-factor authentication enabled, you will be asked to enter a code that will be sent to you by SMS or through the mobile application. If you have a token, click Use token, then paste the token in the Token field, and click Log In.Įnter your GitHub credentials in the browser window that opens. Log in to GitHub by doing one of the following: ![]() In the Get from Version Control dialog, choose GitHub on the left. If the Git menu is not available, choose VCS | Get from Version Control. Push the changes in your local repository to can clone a repository that you want to contribute to directly from P圜harm and create a new project based on it.įrom the main menu, choose Git | Clone. ![]() To remove this commit and modify the file, use 'git reset -soft HEAD~1' and commit and add the file again. $ git commit -m "Add existing file" # Commits the tracked changes and prepares them to be pushed to a remote repository. To unstage a file, use 'git reset HEAD YOUR-FILE'.Ĭommit the file that you've staged in your local repository. # Adds the file to your local repository and stages it for commit. Stage the file for commit to your local repository. On your computer, move the file you'd like to upload to GitHub into the local directory that was created when you cloned the repository.Ĭhange the current working directory to your local repository. Sensitive information can include, but is not limited to:įor more information, see " Removing sensitive data from a repository." Warning: Never git add, commit, or push sensitive information to a remote repository. You can upload an existing file to a repository on using the command line. For more information, see " Creating a pull request."Īdding a file to a repository using the command line If your current branch is the default branch, you should choose to create a new branch for your commit and then create a pull request. For more information, see " Creating a commit with multiple authors."īelow the commit message fields, decide whether to add your commit to the current branch or to a new branch. You can attribute the commit to more than one author in the commit message. In the "Commit message" field, type a short, meaningful commit message that describes the change you made to the file. To select the files you want to upload, drag and drop the file or folder, or click choose your files. Alternatively, you can drag and drop files into your browser. On, navigate to the main page of the repository.Ībove the list of files, select the Add file dropdown menu and click Upload files. For more information, see " Committing and reviewing changes to your project in GitHub Desktop." You can use GitHub Desktop to move your changes to a new branch and commit them. For more information, see " About protected branches."
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |