Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the skills of using GitHub

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what are the skills for using GitHub". Friends who are interested may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what are the skills for using GitHub?"

Original title: little-known skills in using GitHub

Do you often go to GitHub? But you may not know all kinds of tips for using GitHub. This article will share with you a variety of tips for using GitHub.

Ignore spaces when diff

Some changes just add or subtract spaces, which can be ignored by adding? White1 to the URL.

View the submission history of an author

Add author=username to URL, for example:

Https://github.com/rails/rails/commits/master?author=dhh comparison version

Compare branches using URL similar to the following:

Https://github.com/rails/rails/compare/master...4-1-stable

You can also use the following format:

Https://github.com/rails/rails/compare/master@{1.day.ago}...masterhttps://github.com/rails/rails/compare/master@{2014-10-04}...master

If you want to compare with a derived warehouse, add the derived warehouse name as a prefix:

Https://github.com/rails/rails/compare/byroot:master...master is embedded in Gist through HTML.

Gists is a code snippet service based on Git launched by GitHub. The Gists page provides JavaScript code that allows you to embed Gist into other sites. But many sites paste JavaScript does not work, at this time you can append .pibb to the Gist URL, get a pure HTML version, and then you can copy and paste the HTML source code to other sites. For example, https://gist.github.com/tiimgreen/10545817.pibb

Git.io

Git.io is a short URL service for GitHub.

Of course, for convenience, you can also use Curl to access:

$curl-I http://git.io-F "url= https://github.com/..."

HTTP/1.1201Created

Location: http://git.io/abc123

$curl-I http://git.io/abc123

HTTP/1.1302Found

Location: https://github.com/...

You can even specify the field of the short URL:

$curl-I http://git.io-F "url= https://github.com/technoweenie"\-F" code=t "HTTP/1.1201CreatedLocation: http://git.io/t highlight line

For example, add # L52 to URL to highlight line 52. Or you can click on the number of lines directly.

Multi-line highlights are also supported. You can use a format similar to # L53-L60, or press and hold shift while clicking.

Https://github.com/rails/rails/blob/master/activemodel/lib/active_model.rb#L53-L60

Quick reference

You can select other people's comments and press r, which will be copied in the text box in the form of a reference:

Task list

In a work order or merge request, you can use task list syntax:

-[] Be awesome- [] Do stuff- [] Sleep

When checked, Markdown will be updated:

-[x] Be awesome- [x] Do stuff- [] Sleep merge requested diff and patch

You can add .diff and .patch after URL to view the merge request in the corresponding mode:

Https://github.com/tiimgreen/github-cheat-sheet/pull/15https://github.com/tiimgreen/github-cheat-sheet/pull/15.diffhttps://github.com/tiimgreen/github-cheat-sheet/pull/15.patch

The result is plain text:

Diff-git a/README.md b/README.md

Index 88fcf69..8614873100644

-a/README.md)

+ b/README.md

@ @-28pi 6-28-6-28-7 all the hidden andnot hidden features of GitandGitHub.This cheat sheet was i

-[MergedBranches] (# merged-branches)

-[QuickLicensing] (# quick-licensing)

-[TODO Lists] (# todo-lists)

+-[RelativeLinks] (# relative-links)

-[.gitconfig Recommendations] (# gitconfig-recommendations)

-[Aliases] (# aliases)

-[Auto-correct] (# auto-correct)

@ @-381 they will be updated in the pure Markdown 619 382 when they are clicked, they will be updated in the pure Markdown:

-[] Sleep

(.)

At this point, I believe you have a deeper understanding of "what are the skills for the use of GitHub?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report