If you are using an older version of git (pre 2.28), the above command won't work. The best way to accomplish this is to change your default branch name to main: $ git config -global faultBranch main You want to make sure that both git and GitHub are using the same branch name, so we'll use main. git initĪs of late 2020, GitHub uses main as the name of your primary branch - it used to use master, but git still defaults to master. We are using markdown here because it is readable as plain text and will render nicely when we share our repository on in the next section. These particular files use the markdown format. The files above, README.md and LICENSE.md, are for demonstration purposes only, though they are included in the root directory of many open source projects. These two commands, thus, create 2 files, README.md and LICENSE.md, each of which starts with a simple comment ( # README #, # LICENSE #). This operator takes the output of the command and places it in the file whose name appears to the right. Next, let's look at what structure our test site should have.The > character on lines 3 and 4 above is the redirection operator. That way you'll bump into fewer problems later down the road. ![]() For these reasons, it is best to get into the habit of writing your folder and file names lowercase with no spaces and with words separated by hyphens, at least until you know what you're doing. The Google search engine treats a hyphen as a word separator but does not regard an underscore that way. The short answer is that you should use a hyphen for your file names. It's better to separate words with hyphens, rather than underscores: my-file.html vs. Some servers will replace the areas in your filenames with "%20" (the character code for spaces in URLs), resulting in all your links being broken. For example, if you use spaces in your filename, some systems may treat the filename as two filenames. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |