GitHub

GitHub CLI:

µ­»ö:


issue/PR¤Î¸¡º÷


Discussions Polls: Åêɼµ¡Ç½


¥¿¥¹¥¯¥ê¥¹¥È

```[tasklist]
# title
- [ ] task1
- [ ] task2
```

GitHubǧÄê»î¸³/ÊÙ¶¯

MS Learn:


CodeRabbit: AI¤Ë¤è¤ë¥³¡¼¥É¥ì¥Ó¥å¡¼

µ­»ö:


GitHub Copilot: AI¤Ë¤è¤ë¥³¡¼¥ÉÊä´°¥Ä¡¼¥ë

µ­»ö:


github.com¦¤ÎRSA SSH host key¤¬ÊѤï¤Ã¤Æ¡ÖWARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!¡×


GeoJSON/TopoJSON: Markdown¤ËÃÏ¿Þ¤òɽ¼¨¤¹¤ë

µ­»ö:


Saved reply: ÊÖ¿®¤ò¥Æ¥ó¥×¥ì¡¼¥È²½¤·¤Æ¸Æ¤Ó½Ð¤¹


¥³¥ß¥Ã¥È¥í¥°¤«¤éemail¥¢¥É¥ì¥¹¤ò±£¤¹

¥Ç¥Õ¥©¥ë¥È¤Ç¤Ïgit commit¤Ëemail¤¬´Þ¤Þ¤ì¤ë¤¿¤á¡¢public repo¤Ë¥³¥ß¥Ã¥È¤¹¤ë¤Èbot¤Ë¥¯¥í¡¼¥ë¤µ¤ì¤Æspam¤¬Íè¤ë¡£

Âкö:

µ­»ö:


¥ï¡¼¥¯¥Õ¥í¡¼

µ­»ö:


¥ê¥ê¡¼¥¹¥Î¡¼¥È¤Î¼«Æ°²½

µ­»ö:


Push protection: ÆÃÄê¥Ö¥é¥ó¥Á¤òÊݸľÀÜ¥³¥ß¥Ã¥È¤ò¥Ö¥í¥Ã¥¯

µ­»ö:


¥Ç¥×¥í¥¤¥­¡¼¤Çcheckout¤¹¤ë


mermaidµ­Ë¡¤ÇMarkdownÆâ¤Ë¥À¥¤¥¢¥°¥é¥à¤ò½ñ¤¯

mermaidµ­Ë¡

µ­»ö:

¤½¤Î¾¤ÎÁªÂò»è¡£AWS¥¢¥¤¥³¥óÅù¤ò»È¤¤¤¿¤¤¤Ê¤É


force push¤Î¶Ø»ß

µ­»ö:


¥ê¥Ý¥¸¥È¥ê¤«¤éµ¡Ì©¾ðÊó¤Îºï½ü

µ­»ö:


Codespaces


Secret scanning: ¸í¤Ã¤Æ¥³¥ß¥Ã¥È¤µ¤ì¤¿¥·¡¼¥¯¥ì¥Ã¥È¤ÎÉÔÀµ»ÈÍѤòËÉ»ß


Issue¤«¤é¥¬¥ó¥È¥Á¥ã¡¼¥È¤òºî¤ë

2021-04¸½ºß¡¢É¸½àµ¡Ç½¤Ë¤Ï¥Á¥ã¡¼¥ÈºîÀ®¤Ï̵¤¤


git pull¤¬¼ºÇÔ¤¹¤ë¾ì¹ç

³Îǧ:

²ò·è: ControlMaster ¤òÌÀ¼¨Åª¤ËÀÚÃǤ¹¤ë


OSS¤Ø¤Î¹×¸¥ Issue/PullRequest¤Îºî¤êÊý


PR¤äIssue¤«¤é¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯


Code Scanning: ¥³¡¼¥É¤ÎÀȼåÀ­¤È¥¨¥é¡¼¤ò¼«Æ°Åª¤Ë¥¹¥­¥ã¥ó

Í­¸ú²½¼ê½ç:


Subvesion¤«¤éGitHub¤Ø°Ü¹Ô

local¤Ë¤¢¤ë¡Öfile:///var/www/svn/dev/¡×¤ògithub private repo¤Ø°Ü¹Ô¤¹¤ë:

  1. ¶õ¤Îgit repo¤òºîÀ®
    mkdir -p git-svn/dev/
    cd git-svn/dev/
    
    # svn¤Îrev¤ò³Îǧ
    svn info file:///var/www/svn/dev/
  2. git repo¤Î½é´ü²½: .git/config ¤ËÊݸ¤µ¤ì¤ë¡£
    • °ìÈÌŪ¤Êsvn: °Ê²¼¤Î¤è¤¦¤Ë branches, tags, trunk¤¬¤¢¤ë¾ì¹ç
      svn ls file:///var/www/svn/repo/
      branches/
      tags/
      trunk/
      
      git svn init -s --prefix=svn/ --no-minimize-url file:///var/www/svn/dev/
    • trunkÅù¤¬Ìµ¤¯¡¢Ä¾ÀÜ¥Õ¥¡¥¤¥ë¤¬ÃÖ¤¤¤Æ¤¢¤ë¾ì¹ç¡£¡Ö--trunk=/¡×¤òÄɲ乤ë
      svn ls file:///var/www/svn/repo/
      dir1
      dir2
      ...
      
      git svn init -s --prefix=svn/ --no-minimize-url --trunk=/ file:///var/www/svn/dev/
  3. svn repo¤«¤égit repo¤Øfetch¤¹¤ë
    git svn fetch
  4. GitHub¤Ï1¥Õ¥¡¥¤¥ë50MB¤Ç·Ù¹ð¡¢100MB¤Ç¥Ö¥í¥Ã¥¯¤µ¤ì¤ëÀ©¸Â¤¬¤¢¤ë¡£git¤Ïsvn¤È°ã¤¤¡¢Éôʬ¥Á¥§¥Ã¥¯¥¢¥¦¥È¤Ç¤­¤Ê¤¤¤Î¤Ç¥Ð¥¤¥Ê¥ê¥Õ¥¡¥¤¥ë¤Ïºï½ü¤·¤Æ¡¢·ÚÎ̲½¤·¤¿¤Û¤¦¤¬Îɤ¤¡£
  5. svn¤Î¥Ö¥é¥ó¥Á/¥¿¥°¤ògit¤ØÊÑ´¹¤·¤¿¤¤¾ì¹ç
  6. remote¤Øpush
    git remote add origin git@github.com:<user>/<repo>.git
    git branch -M master
    git push -u origin master

GitHub pages: GitHub ¥ê¥Ý¥¸¥È¥ê¤Çweb¥µ¥¤¥È¤ò¸ø³«


fork¸µ¥ê¥Ý¥¸¥È¥ê¤ÈƱ´ü

  1. upstream ¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¤«³Îǧ¡£¤³¤³¤Ç¤Ïorigin¤·¤«¤«¤Ã¤¿
    git remote -v
    
    origin  git@github.com:<YOUR_USER>/<REPO>.git (fetch)
    origin  git@github.com:<YOUR_USER>/<REPO>.git (push)
  2. fork¸µ¤ò upstream ¤È¤·¤ÆÅÐÏ¿
    git remote add upstream https://github.com/<ORIGINAL_USER>/<REPO>.git
  3. upstream¤òºÇ¿·¤Ë¹¹¿·
    git fetch upstream
  4. ¼«Ê¬¤Î¥ê¥Ý¥¸¥È¥ê¤ËÊѹ¹¤ò¼è¤ê¹þ¤à
    git checkout master
    git pull -p
    git merge upstream/master
  5. Êѹ¹ÅÀ¤ò³Îǧ¤·¤Æ¡¢¼«Ê¬¤Î¥ê¥Ý¥¸¥È¥ê¤Ëpush
    git diff origin/master
    git push origin master

act: GitHub Actions¤ò¥í¡¼¥«¥ë¼Â¹Ô

¢¨GitHub actions¤Ë¡Öworkflow_dispatch¡×¤¬Äɲ䵤줿¤Î¤Ç¡¢¼êÆ°¤Ç¤Î¥Æ¥¹¥È¤Ï¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿


self-hosted runner: Actions¤ò¼Â¹Ô¤¹¤ëÆȼ«¥Û¥¹¥È


private github¤ÎReleases¤«¤é¥Õ¥¡¥¤¥ë¤ò¥À¥¦¥ó¥í¡¼¥É¤¹¤ë


Advanced search


¥ê¥Ý¥¸¥È¥ê¤Î°Ü¾ù


¥¬¥¤¥É¥é¥¤¥ó


ToC: Ìܼ¡¤Î¼«Æ°À¸À®


Packages: ¥Ñ¥Ã¥±¡¼¥¸¤Î¸ø³«


Draft Pull Request

PR¤òºî¤ë»þ¤ËÁªÂò¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£

PR¤òDraft¤ØÌ᤹¡£


PRÃæ¤Ë¥Õ¥£¡¼¥É¥Ð¥Ã¥¯¤ò¼è¤ê¹þ¤à

PR¤Î¥ì¥Ó¥å¡¼Ãæ¤Ë¡¢¿ô¹Ô¤ÎÊѹ¹¤òÄó°Æ¤·¤¿¤¤¾ì¹ç¤ËÊØÍø¡£


Organization: ´ë¶È¤äÁÈ¿¥Ã±°Ì¤Ç¥ê¥Ý¥¸¥È¥ê¤ò´ÉÍý


Insights: ¥ê¥Ý¥¸¥È¥ê/Organization¤ÎʬÀÏ/²Ä»ë²½


README.md ¤Î½ñ¤­Êý


CHANGELOG.md ¤Î½ñ¤­Êý


project/¥¹¥±¥¸¥å¡¼¥ë´ÉÍý


̵ÎÁ¥¢¥«¥¦¥ó¥È¤Ï1¸Ä¿Í1¤Ä

GitHub¤Îµ¬ÌóŪ¤Ë¤Ï¡£


Ê£¿ô¥¢¥«¥¦¥ó¥È¤Î¥Þ¡¼¥¸


WebHookÅù¤Çµö²Ä¤¹¤Ù¤­IP

IPÀ©¸Â¤ò¤·¤Æ¤¤¤ë¾ì¹ç¡¢GitHub¤ÎIP¤òµö²Ä¤¹¤ëɬÍפ¬¤¢¤ë¡£


Actions: ¥ï¡¼¥¯¥Õ¥í¡¼¤Î¼«Æ°²½¤È¥«¥¹¥¿¥Þ¥¤¥º


debug: ¥Ç¥Ð¥Ã¥°


GitHub actions¤Çs3 bucket¤Ø¥¢¥Ã¥×¥í¡¼¥É

µ­»ö:


Variables: ÊÑ¿ô¤ÎÍøÍÑ


timeout, failed»þ¤Îretry


local¤Ç¤Î¥Æ¥¹¥È


¥Þ¥ë¥Á¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Î¥Ó¥ë¥É

µ­»ö:


¥Ó¥ë¥É»þ¤Î¥³¥¹¥È

µ­»ö:


AWS¤È¤ÎÏ¢·È


GitHub markdown¤Ç»È¤¨¤ë¸À¸ì

```¸À¸ì¤Î̾Á° or aliases
¥³¡¼¥É
```

GitHub¾å¤Ç¡¢¥Ö¥é¥ó¥Á¡¢¥³¥ß¥Ã¥ÈID¤ÎÈæ³Ó

GitHub¾å¤Ç¡¢¥Ö¥é¥ó¥Á¡¢¥³¥ß¥Ã¥ÈID´Ö¤ÎÈæ³Ó¤¬¤Ç¤­¤ë¡£
¥ì¥Ó¥å¡¼¤¹¤ë¿Í¤ÎÉéô¤¬¸º¤ë¡£

GUI¤Î¾ì¹ç:

  1. ¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹¤«¤é¡¢¥Ç¥Õ¥©¥ë¥È°Ê³°¤Îbranch¤òÁªÂò
  2. Clone¥Ü¥¿¥ó¤Î²¼¤Ë¡¢¡ÖCompare¡×¥ê¥ó¥¯¤¬É½¼¨¤µ¤ì¤ë¤Î¤Ç¥¯¥ê¥Ã¥¯
  3. Èæ³Ó¤·¤¿¤¤branch¤òÁªÂò

URL¤«¤éľÀÜÆþÎϤ¹¤ë¾ì¹ç:


GitHub¤ò»È¤Ã¤¿³«È¯¥Õ¥í¡¼


Issue/PR Template

Îã:


ÆóÃʳ¬Ç§¾Ú


°ì»þŪ¤Ë¥æ¡¼¥¶Ì¾¤ÎÊѹ¹


GitHub for Windows¤ÇBitBucket¤ò»È¤¦

GitHub¤Ï¥Ç¥Õ¥©¥ë¥È¤ÇÀµ¤·¤¤ÈëÌ©¸°¤¬»ØÄꤵ¤ì¤ë¤è¤¦¤À¤¬¡¢BitBucket¤Ç¤ÏÈëÌ©¸°¤òÌÀ¼¨Åª¤Ë»ØÄꤹ¤ëɬÍפ¬¤¢¤Ã¤¿

  1. https://bitbucket.org/ ¤Î¥¢¥«¥¦¥ó¥È¤Î´ÉÍý > SSH¥­¡¼¤ËGitHub for Windows¤Ç»ÈÍѤ·¤Æ¤¤¤ë¸ø³«¸°¤òÄɲÃ
    • %USERPROFILE%\.ssh\github_rsa.pub
  2. Git Shell¤ò³«¤­°Ê²¼¤Î¤è¤¦¤Ë¤¹¤ë
    vim ~/.ssh/config
    ----
    Host bitbucket.org
      User git
      Port 22
      HostName bitbucket.org
      IdentityFile ~/.ssh/github_rsa
      TCPKeepAlive yes
      IdentitiesOnly yes
    ----

GitHub¤ËÅÐÏ¿¤·¤¿¸ø³«¸°¤ÏÀ¤³¦¤Ë¸ø³«¤µ¤ì¤ë


¤è¤¯»È¤¦¥ê¥ó¥¯


Markdownµ­Ë¡


webhook: push¸å¡¢»ØÄꥵ¡¼¥Ð¤ËÄÌÃΤòÁ÷¿®¡¢¥µ¡¼¥Ð¾å¤Ç¼«Æ°¹¹¿·


Àܳ¤Ë»È¤¦¥æ¡¼¥¶¤Î³Îǧ

ssh -T git@github.com

Hi <UserName> ...

ERROR: Repository not found.


Issue


github¤Îpull request

Êѹ¹ÅÀ¤ò´Þ¤ó¤À¥Ö¥é¥ó¥Á¤ò¸µ¥ê¥Ý¥¸¥È¥ê¤Ë¼è¤ê¹þ¤ó¤ÇÌ㤦¤è¤¦¤Ë¥ê¥¯¥¨¥¹¥È¤òÅꤲ¤ë»ö

  1. ³ºÅö¥Ö¥é¥ó¥Á¤òÁªÂò
  2. Compare & pull Request ¥Ü¥¿¥ó
  3. @̾Á°¤Ç³ºÅö¤Î¿Í¤òµ­Æþ
  1. Changeset¤ÇÊѹ¹ÅÀ¤ò³Îǧ
  2. Merge pull request
  3. Confirm merge
  4. Delete branch

¥ê¥Ý¥¸¥È¥êËè¤ËÊ̤Îgithub¥¢¥«¥¦¥ó¥È¤ò»È¤¦


»È¤¤Êý

  1. https://github.com/signup/free ̵ÎÁ¥¢¥«¥¦¥ó¥È¤ÎºîÀ®
  2. Linux¾å¤Ç¤Îºî¶ÈÍѤËSSH¸ø³«¸°¤ÎÅÐÏ¿¡£¥Ñ¥¹¥Õ¥ì¡¼¥º¤ò¤¢¤ê¤Ë¤¹¤ë¤ÈËè²óʹ¤«¤ì¤ë¤Î¤Ç¶õ¤Ç¤âÎɤ¤
    ssh-keygen -t rsa -C "your_email@youremail.com"
    
    ÈëÌ©¸°¤È¸ø³«¸°¤¬½ÐÍè¤ë¤Î¤ÇÊݸ¤·¤Æ¤ª¤¯
    ~/.ssh/id_rsa
    ~/.ssh/id_rsa.pub
    
    ¥³¥ß¥Ã¥È¥í¥°¤Ëɽ¼¨¤µ¤ì¤ë̾Á°¤È¥á¡¼¥ë¥¢¥É¥ì¥¹¤òÀßÄê¡£~/.gitconfig ¤ËÊݸ¤µ¤ì¤ë
    git config --global user.name "your_name"
    git config --global user.email "your_email@youremail.com"
  3. github¤Ë¥í¥°¥¤¥ó¤·¤¿¾õÂ֤DZ¦¾å¤ÎAccount Settings¤òÁªÂò¤·¡¢SSH Keys > Add SSH Key¤Ë¡Ö~/.ssh/id_rsa.pub¡×¤ÎÆâÍƤò¥³¥Ô¥Ú
  4. ±¦¾å¤ÎCreate New Repo¤Ç¿·¤·¤¤¥ê¥Ý¥¸¥È¥ê(Î㡧example)¤òºîÀ®
  5. ¥í¡¼¥«¥ë¤Ë¿·µ¬¥ê¥Ý¥¸¥È¥ê¤òºîÀ®¤¹¤ë¾ì¹ç
    mkdir example
    cd example
    git init
    touch README
    git add README
    git commit -m 'first commit'
    # URL¤Ë'origin' ¤È¤¤¤¦Ã»¤¤ÊÌ̾¤òÉÕ¤±¤ë(ɬ¿Ü¤Ç¤Ï¤Ê¤¤)
    git remote add origin git@github.com:your_name/example.git
    # git push git@github.com:your_name/example.git master:master ¤ÈƱ¤¸
    git push -u origin master
    • linux¾å¤Ç¥í¡¼¥«¥ë¥ê¥Ý¥¸¥È¥ê¤ò¤â¤Ã¤Æ¤¯¤ë¾ì¹ç
      git clone git://github.com/your_name/example.git
      cd example
      
      # ¥ê¥â¡¼¥È¤Î¹¹¿·ÆâÍƤòÈ¿±Ç
      git pull
      
      # ¥Õ¥¡¥¤¥ë¤ÎÄɲÃ
      git add README
      
      # Á´¤Æ¤ÎÊѹ¹¤òÄɲÃ
      git add .
      
      # Êѹ¹¤Î³Îǧ
      git status
      
      # º¹Ê¬¤Î³Îǧ
      git diff [¥Õ¥¡¥¤¥ë̾]
      
      # Êѹ¹¤ò¸µ¤ËÌ᤹
      git revert ¥Õ¥¡¥¤¥ë̾
      
      # Êѹ¹¤Î¥³¥ß¥Ã¥È
      git commit -a
      
      # ¥ê¥â¡¼¥È¥ê¥Ý¥¸¥È¥ê¤ØÈ¿±Ç
      git push

¥È¥Ã¥×   ÊÔ½¸ Åà·ë º¹Ê¬ ¥Ð¥Ã¥¯¥¢¥Ã¥× źÉÕ Ê£À½ ̾Á°Êѹ¹ ¥ê¥í¡¼¥É   ¿·µ¬ °ìÍ÷ ¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS
Last-modified: 2024-11-13 (¿å) 23:09:46