![]() You have now created a repository, including a README file, and created your first commit on. git add README.md & git commit -m "Add README" Nothing added to commit but untracked files present (use "git add" to track) You will see that you have an untracked README.md file. echo "info about this project" > README.mdĮnter git status. (This directory was created when you ran the gh repo create command.)Ĭreate a README file with some information about the project. In the command line, navigate to the root directory of your new project. The contents of your README file are automatically shown on the front page of your repository. In this tutorial, youll be looking two different ways to PUSH to GitHub. The command used for pushing to GitHub is given below. README files are a great place to describe your project in more detail, or add some documentation such as how to install or use your project. The git push command is used to transfer or push the commit, which is made on a local branch in your computer to a remote repository like GitHub. Now that you have created a project, you can start committing changes. For more information, see " Creating a pull request." ![]() 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. If you select Show diff, you will see the new content in green. In the text box, type some information about yourself. In the upper right corner of the file view, click to open the file editor. In your repository's list of files, select README.md. Let's commit a change to the README file. README files are a great place to describe your project in more detail, or add some documentation such as how to install or use your project. When you created your new repository, you initialized it with a README file. For more information about possible arguments, see the GitHub CLI manual.Ī commit is like a snapshot of all the files in your project at a particular point in time. To clone the repository locally, pass the -clone flag. For example, gh repo create project-name -public.
0 Comments
Leave a Reply. |