https://rubika.ir/Doa_jadogar_Talas #205470
Closed
Wahabsaha0098
started this conversation in
A Welcome to GitHub
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Introduce yourself
Hello World
Follow this Hello World exercise to learn GitHub's pull request workflow.
Introduction
This tutorial teaches you GitHub essentials like repositories, branches, commits, and pull requests. You'll create your own Hello World repository and learn GitHub's pull request workflow, a popular way to create and review code.
In this quickstart guide, you will:
Prerequisites
You must have a GitHub account. For more information, see Creating an account on GitHub.
You don't need to know how to code, use the command line, or install Git (the version control software that GitHub is built on).
Step 1: Create a repository
The first thing we'll do is create a repository. You can think of a repository as a folder that contains related items, such as files, images, videos, or even other folders. A repository usually groups together items that belong to the same "project" or thing you're working on.
Often, repositories include a README file, a file with information about your project. README files are written in Markdown, which is an easy-to-read, easy-to-write language for formatting plain text. You can learn more about Markdown and README files in Basic writing and formatting syntax and Managing your profile README.
GitHub lets you add a README file at the same time you create your new repository. GitHub also offers other common options such as a license file, but you do not have to select any of them now.
Your
hello-worldrepository can be a place where you store ideas, resources, or even share and discuss things with others.In the upper-right corner of any page, select , then click New repository.
In the "Repository name" box, type
hello-world.In the "Description" box, type a short description. For example, type "This repository is for practicing the GitHub Flow."
Select whether your repository will be Public or Private.
Select Add a README file.
Click Create repository.
Step 2: Create a branch
Branching lets you have different versions of a repository at one time.
By default, your repository has one branch named
mainthat is considered to be the definitive branch. You can create additional branches off ofmainin your repository.Branching is helpful when you want to add new features to a project without changing the main source of code. The work done on different branches will not show up on the main branch until you merge it, which we will cover later in this guide. You can use branches to experiment and make edits before committing them to
main.When you create a branch off the
mainbranch, you're making a copy, or snapshot, ofmainas it was at that point in time. If someone else made changes to themainbranch while you were working on your branch, you could pull in those updates.This diagram shows:
mainbranchfeaturefeaturetakes through stages for "Commit changes," "Submit pull request," and "Discuss proposed changes" before it's merged intomainCreating a branch
Click the Code tab of your
hello-worldrepository.Above the file list, click the dropdown menu that says main.
Type a branch name,
readme-edits, into the text box.Click Create branch: readme-edits from main.
Now you have two branches,
mainandreadme-edits. Right now, they look exactly the same. Next you'll add changes to the newreadme-editsbranch.Step 3: Make and commit changes
When you created a new branch in the previous step, GitHub brought you to the code page for your new
readme-editsbranch, which is a copy ofmain.You can make and save changes to the files in your repository. On GitHub, saved changes are called commits. Each commit has an associated commit message, which is a description explaining why a particular change was made. Commit messages capture the history of your changes so that other contributors can understand what you’ve done and why.
readme-editsbranch you created, click theREADME.mdfile.These changes will be made only to the README file on your
readme-editsbranch, so now this branch contains content that's different frommain.Step 4: Open a pull request
Now that you have changes in a branch off of
main, you can open a pull request.Pull requests are the heart of collaboration on GitHub. When you open a pull request, you're proposing your changes and requesting that someone review and pull in your contribution and merge them into their branch. Pull requests show diffs, or differences, of the content from both branches. The changes, additions, and subtractions are shown in different colors.
As soon as you make a commit, you can open a pull request and start a discussion, even before the code is finished.
In this step, you'll open a pull request in your own repository and then merge it yourself. It's a great way to practice the GitHub flow before working on larger projects.
Click the Pull requests tab of your
hello-worldrepository.Click New pull request.
In the Example Comparisons box, select the branch you made,
readme-edits, to compare withmain(the original).Look over your changes in the diffs on the Compare page, make sure they're what you want to submit.
Click Create pull request.
Give your pull request a title and write a brief description of your changes. You can include emojis and drag and drop images and gifs.
Click Create pull request.
Reviewing a pull request
When you start collaborating with others, this is the time you'd ask for their review. This allows your collaborators to comment on, or propose changes to, your pull request before you merge the changes into the
mainbranch.We won't cover reviewing pull requests in this tutorial, but if you're interested in learning more, see Pull request reviews. Alternatively, try the GitHub Skills "Reviewing pull requests" course.
Step 5: Merge your pull request
In this final step, you will merge your
readme-editsbranch into themainbranch. After you merge your pull request, the changes on yourreadme-editsbranch will be incorporated intomain.Sometimes, a pull request may introduce changes to code that conflict with the existing code on
main. If there are any conflicts, GitHub will alert you about the conflicting code and prevent merging until the conflicts are resolved. You can make a commit that resolves the conflicts or use comments in the pull request to discuss the conflicts with your team members.In this walk-through, you should not have any conflicts, so you are ready to merge your branch into the main branch.
main.main, you can safely delete thereadme-editsbranch. If you want to make more changes to your project, you can always create a new branch and repeat this process.hello-worldrepository to see your published changes onmain.Conclusion
By completing this tutorial, you've learned to create a project and make a pull request on GitHub.
As part of that, we've learned how to:
Next steps
Further reading
Links (optional)
Basic writing and formatting syntax
Create sophisticated formatting for your prose and code on GitHub with simple syntax.
Headings
To create a heading, add one to six # symbols before your heading text. The number of # you use will determine the hierarchy level and typeface size of the heading.
When you use two or more headings, GitHub automatically generates a table of contents that you can access by clicking the "Outline" menu icon within the file header. Each heading title is listed in the table of contents and you can click a title to navigate to the selected section.
Styling text
You can indicate emphasis with bold, italic, strikethrough, subscript, or superscript text in comment fields and
.mdfiles.** **or__ __**This is bold text*** *or_ __This text is italicized_~~ ~~or~ ~~~This was mistaken text~~This was mistaken text** **and_ _**This text is _extremely_ important***** ******All this text is important***<sub> </sub>This is a <sub>subscript</sub> text<sup> </sup>This is a <sup>superscript</sup> text<ins> </ins>This is an <ins>underlined</ins> textQuoting text
You can quote text with a >.
Text that is not a quote > Text that is a quoteQuoted text is indented with a vertical line on the left and displayed using gray type.
Note
When viewing a conversation, you can automatically quote text in a comment by highlighting the text, then typing R. You can quote an entire comment by clicking , then Quote reply. For more information about keyboard shortcuts, see Keyboard shortcuts.
Quoting code
You can call out code or a command within a sentence with single backticks. The text within the backticks will not be formatted. You can also press the Command+E (Mac) or Ctrl+E (Windows/Linux) keyboard shortcut to insert the backticks for a code block within a line of Markdown.
To format code or text into its own distinct block, use triple backticks.
For more information, see Creating and highlighting code blocks.
If you are frequently editing code snippets and tables, you may benefit from enabling a fixed-width font in all comment fields on GitHub. For more information, see About writing and formatting on GitHub.
Supported color models
In issues, pull requests, and discussions, you can call out colors within a sentence by using backticks. A supported color model within backticks will display a visualization of the color.
Here are the currently supported color models.
`#RRGGBB``#0969DA``rgb(R,G,B)``rgb(9, 105, 218)``hsl(H,S,L)``hsl(212, 92%, 45%)`Note
Links
You can create an inline link by wrapping link text in brackets
[ ], and then wrapping the URL in parentheses( ). You can also use the keyboard shortcut Command+K to create a link. When you have text selected, you can paste a URL from your clipboard to automatically create a link from the selection.You can also create a Markdown hyperlink by highlighting the text and using the keyboard shortcut Command+V. If you'd like to replace the text with the link, use the keyboard shortcut Command+Shift+V.
This site was built using [GitHub Pages](https://pages.github.com/).Note
GitHub automatically creates links when valid URLs are written in a comment. For more information, see Autolinked references and URLs.
Section links
You can link directly to any section that has a heading. To view the automatically generated anchor in a rendered file, hover over the section heading to expose the icon and click the icon to display the anchor in your browser.
If you need to determine the anchor for a heading in a file you are editing, you can use the following basic rules:
-). Any other whitespace or punctuation characters are removed._italics_becomesitalics).For more detailed information on the requirements of URI fragments, see RFC 3986: Uniform Resource Identifier (URI): Generic Syntax, Section 3.5.
The code block below demonstrates the basic rules used to generate anchors from headings in rendered content.
Note
If you edit a heading, or if you change the order of headings with "identical" anchors, you will also need to update any links to those headings as the anchors will change.
Relative links
You can define relative links and image paths in your rendered files to help readers navigate to other files in your repository.
A relative link is a link that is relative to the current file. For example, if you have a README file in root of your repository, and you have another file in docs/CONTRIBUTING.md, the relative link to CONTRIBUTING.md in your README might look like this:
GitHub will automatically transform your relative link or image path based on whatever branch you're currently on, so that the link or path always works. The path of the link will be relative to the current file. Links starting with
/will be relative to the repository root. You can use all relative link operands, such as./and../.Your link text should be on a single line. The example below will not work.
Relative links are easier for users who clone your repository. Absolute links may not work in clones of your repository - we recommend using relative links to refer to other files within your repository.
Custom anchors
You can use standard HTML anchor tags (
<a name="unique-anchor-name"></a>) to create navigation anchor points for any location in the document. To avoid ambiguous references, use a unique naming scheme for anchor tags, such as adding a prefix to thenameattribute value.Note
Custom anchors will not be included in the document outline/Table of Contents.
You can link to a custom anchor using the value of the
nameattribute you gave the anchor. The syntax is exactly the same as when you link to an anchor that is automatically generated for a heading.For example:
Tip
Custom anchors are not considered by the automatic naming and numbering behavior of automatic heading links.
Line breaks
If you're writing in issues, pull requests, or discussions in a repository, GitHub will render a line break automatically:
However, if you are writing in an .md file, the example above would render on one line without a line break. To create a line break in an .md file, you will need to include one of the following:
Include two spaces at the end of the first line.
Include a backslash at the end of the first line.
This example\ Will span two linesInclude an HTML single line break tag at the end of the first line.
This example<br/> Will span two linesIf you leave a blank line between two lines, both .md files and Markdown in issues, pull requests, and discussions will render the two lines separated by the blank line:
Images
You can display an image by adding ! and wrapping the alt text in
[ ]. Alt text is a short text equivalent of the information in the image. Then, wrap the link for the image in parentheses().GitHub supports embedding images into your issues, pull requests, discussions, comments and
.mdfiles. You can display an image from your repository, add a link to an online image, or upload an image. For more information, see Uploading assets.Note
When you want to display an image that is in your repository, use relative links instead of absolute links.
Here are some examples for using relative links to display an image.
.mdfile on the same branch/assets/images/electrocat.png.mdfile on another branch/../main/assets/images/electrocat.png../blob/main/assets/images/electrocat.png?raw=true.mdfile in another repository/../../../../github/docs/blob/main/assets/images/electrocat.png../../../github/docs/blob/main/assets/images/electrocat.png?raw=trueNote
The last two relative links in the table above will work for images in a private repository only if the viewer has at least read access to the private repository that contains these images.
For more information, see Relative Links.
The Picture element
The
<picture>HTML element is supported.Lists
You can make an unordered list by preceding one or more lines of text with -, *, or +.
To order your list, precede each line with a number.
Nested Lists
You can create a nested list by indenting one or more list items below another item.
To create a nested list using the web editor on GitHub or a text editor that uses a monospaced font, like Visual Studio Code, you can align your list visually. Type space characters in front of your nested list item until the list marker character (- or *) lies directly below the first character of the text in the item above it.
Note
In the web-based editor, you can indent or dedent one or more lines of text by first highlighting the desired lines and then using Tab or Shift+Tab</
Where are you in your GitHub journey?
Here to make connections
And where are you going next on GitHub?
README.md
What technical skills or projects are you working on?
https://ci3.googleusercontent.com/meips/ADKq_NbyNqO9v68ID5zAmvzpi9ela8LEUp8x_9NZid6UDxjmu1hbwBrX1lU8DJSkJ-PdrqS9lzwAclQdkm3VJYwJ7TouAW8toAUstvfPx-rMeeir4Cf4CY3FqcqMMXqtLxjbgtdN09c-bp_uaG4n5i35hx-eY8WXlVioo3Yu0fIiWeGOSeRUvBs5iARo5ijaHAFU2-d7wQel4T5luoy6ZtVrzmfhd0sT6vL4zrlIP4KNopOPBEwT1A0ISJHXTYI18zf5-hHwAkvox_kNboRQF9ckLt4b9Oa4SNoCgZLuD2pr889vttorcZmBpX7-UA0K7oz0lwX4pdKsYbYE_j_2Co8SAlx48Y-nNKTz5rX3iLu2U2O9vGdJKBZh6jsBBwriXwpfV0_FK5KqRgDsofxXh3cNwKjUg3qJZhw34RvR_GWB_1tus3lSY9auwHXUD1nzBRQgv9TulTbPaBpCuBTTboo3H9duMVLmGjYdr2BVcBatVnokFQuSY89J81zH7zErw2xut_62uvwcTTSXctnOFeR-aI9xQ1K_LZXXhNXKF_-g3bGAW_FL50II0dlMLSUMK3n-3a2vJQMNejSye4UJHTwctvOBq8FT_pur-dGxQ1vpkeEUjHWrzXy8-3WbcOhB8Ez5bnn21pmP=s0-d-e1-ft#https://scontent-den2-1.xx.fbcdn.net/v/t39.30808-1/758964301_1773950357113567_4075373394385383479_n.jpg?stp=cp0_dst-jpg_mk1-ffffff-0.00_p64x64_tt6&_nc_cat=110&ccb=1-7&_nc_sid=68c40f&_nc_ohc=rWSkxQXQsG8Q7kNvwFuzEYl&_nc_oc=AdqD7pWlhImzqlbmlA_bA91V6h16KxIT6IEHNLbIMkS7_UlfahcA2m5LCMlh8iG5dVMoUwZ1xPjM4BPmcZ1P2ulY&_nc_ad=z-m&_nc_cid=0&_nc_zt=24&_nc_ht=scontent-den2-1.xx&_nc_gid=V6sPybKIEnRa-4Gg47gb4w&oh=00_AQFGOC_7gCNfASDWgTJMvKNOTnH9HOcVSBF0LMjNCtPMhA&oe=6A8A214D
Got a question for us? (optional)
https://www.instagram.com/_n/user?utm_campaign=follower_activity_email&utm_medium=email&target_user_id=7348409793&utm_source=instagram&show_target=2&username=negar_org_1378&click_source=profile&token=ZMIS71RJtE&uid=3dj1xa9&bypass=1&ndid=65724b7b97b0dH1b5ffd5c1H65725014f7ddfH31
All reactions