From 33b32f2371e9ddaff9066cb6f4971053dc75a907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=A4=E0=AE=AE=E0=AE=BF=E0=AE=B4=E0=AF=8D=20=E0=AE=A8?= =?UTF-8?q?=E0=AF=87=E0=AE=B0=E0=AE=AE=E0=AF=8D?= Date: Thu, 8 May 2025 21:31:58 +0530 Subject: [PATCH 1/7] Tamil translation Index file added --- index-de.html | 3 + index-en.html | 3 + index-es.html | 3 + index-fr.html | 3 + index-it.html | 3 + index-ja.html | 5 +- index-ko.html | 3 + index-pl.html | 5 +- index-pt.html | 5 +- index-ru.html | 3 + index-sk.html | 3 + index-ta.html | 399 +++++++++++++++++++++++++++++++++++++++++++++++ index-vi.html | 3 + index-zh-cn.html | 3 + index-zh-tw.html | 3 + index.html | 1 + 16 files changed, 445 insertions(+), 3 deletions(-) create mode 100644 index-ta.html diff --git a/index-de.html b/index-de.html index 4a1a352..dd0516c 100644 --- a/index-de.html +++ b/index-de.html @@ -25,6 +25,7 @@

Eine Git-Referenz in Bildern

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -527,6 +528,8 @@

    Schnelldurchgang: Was die Kommandos bewirken

    German translation © 2012 Martin Funk, © 2017 Mirko Westermeier. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    A Visual Git Reference

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -499,6 +500,8 @@

    Walkthrough: Watching the effect of commands

    Peter Dave Hello. Polish translation © 2017, Emil Wypych. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    Una referencia visual de Git

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -326,6 +327,8 @@

    Notas Técnicas

    Mark Lodato. Spanish translation © 2012, Lucas Videla. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    Une Référence Visuelle de Git

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -339,6 +340,8 @@

    Notes techniques

    Mark Lodato. French translation © 2012, Michel Lefranc. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    Guida visuale a Git

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -339,6 +340,8 @@

    Technical Notes

    Mark Lodato. Italian translation © 2012, Daniel Londero. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    図解 Git

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -200,8 +201,10 @@

    技術メモ

    Copyright © 2010, Mark Lodato. - 訳の著作権は山本和彦に属します。

    + 訳の著作権は山本和彦に属します。

    . + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    この 作品 は クリエイティブ・コモンズ 表示 - 非営利 - 継承 3.0 アメリカ合衆国 ライセンスの下に提供されています。

    diff --git a/index-ko.html b/index-ko.html index 7b7a7b0..00398db 100644 --- a/index-ko.html +++ b/index-ko.html @@ -25,6 +25,7 @@

    A Visual Git Reference

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -475,6 +476,8 @@

    실습: 명령어들의 결과 확인

    Mark Lodato. 한국어 번역 © 2011, Sean Lee. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    Git: Wizualna ściąga

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -344,7 +345,9 @@

    Przegląd: Jak działają komendy - praktyczne przykład

    Copyright © 2010, Mark Lodato. Polish translation © 2017, - Emil Wypych + Emil Wypych. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    Uma Referência Visual do Git

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -358,7 +359,9 @@

    Observações técnicas

    Copyright © 2010, Mark Lodato. Portuguese translation © 2014, - Gustavo de Oliveira + Gustavo de Oliveira. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    Git: наглядная справка

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -367,6 +368,8 @@

    Технические заметки

    Mark Lodato. Russian translation © 2012, Alex Sychev. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    Príručka Visual Git

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -299,6 +300,8 @@

    Technické poznámky

    Mark Lodato. Slovenský preklad © 2013, Ľudovít Lučenič. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    + + + + அறிவிலி ஒரு காட்சி வழிகாட்டி + + + + + +

    அறிவிலி ஒரு காட்சி வழிகாட்டி

    + +
    + பிற மொழிகள்: + +
    + + + + + +

    இந்த பக்கம் அறிவிலியில் மிகவும் பொதுவான கட்டளைகளுக்கு சுருக்கமான, காட்சி வழிகாட்டியை வழங்குகிறது. அறிவிலி எவ்வாறு வேலை செய்கிறது என்பதைப் பற்றி நீங்கள் கொஞ்சம் அறிந்தவுடன், இந்த தளம் உங்கள் புரிதலை திடப்படுத்தப்படலாம். இந்த தளம் எவ்வாறு உருவாக்கப்பட்டது என்று நீங்கள் ஆர்வமாக இருந்தால், எனது அறிவிலிமைய களஞ்சியத்தைப் பார்க்கவும்.

    + + + +

    தகவல்கள்

    +
      +
    1. அடிப்படை பயன்பாடு
    2. +
    3. மரபுகள்
    4. +
    5. விரிவாக கட்டளைகள் +
        +
      1. வேறுபாடு
      2. +
      3. உறுதிமொழி
      4. +
      5. சரிபார்
      6. +
      7. தனிமைப்படுத்தப்பட்ட தலையுடன் உறுதிமொழிதல்
      8. +
      9. மீட்டமை
      10. +
      11. இணை
      12. +
      13. கனி எடு
      14. +
      15. மறுதளம்
      16. +
      +
    6. +
    7. தொழில்நுட்ப குறிப்புகள்
    8. +
    9. ஒத்திகை: கட்டளைகளின் விளைவைப் பார்ப்பது
    10. +
    + +

    அடிப்படை பயன்பாடு

    + +
    + +

    மேலே உள்ள நான்கு கட்டளைகள் பணி கோப்பகம், மேடை (குறியீட்டு என்றும் அழைக்கப்படுகிறது), மற்றும் வரலாறு (உறுதிமொழிகள் வடிவத்தில்) இதற்கு இடையில் கோப்புகளை நகலெடுக்கின்றன.

    + + + +

    ஊடாடும் வகையில் எந்த ஹன்க்ஸ் நகலெடுக்கிறது என்பதை குறிப்பிட்ட கோப்புகளை தேர்வு செய்வதற்கு பதிலாக (அல்லது கூடுதலாக) நீங்கள் git reset -p, git checkout -p, அல்லது + git add -p கட்டளைகளை பயன்படுத்தலாம்.

    + +

    மேடையில் குதித்து நேரடியாக வரலாற்றிலிருந்து கோப்புகளை சரிபார்க்கவும் முடியும் அல்லது கோப்புகளை முதலில் மேடை ஏற்றாமல் உறுதிமொழியவும் முடியும்.

    + +
    + + + +

    மரபுகள்

    + +

    இந்த ஆவணத்தின் மீதமுள்ள பகுதியில், பின்வரும் படிவத்தில் வரைபடங்களைப் பயன்படுத்துவோம்.

    + +
    + +

    உறுதிமொழிகள் பச்சை நிறத்தில் 5-எழுத்து அடையாளங்களாக காட்டப்பட்டுள்ளன, மேலும் அவை அவற்றின் பெற்றோர்களை சுட்டிக்காட்டுகிறது. கிளைகள் ஆரஞ்சு நிறத்தில் காட்டப்பட்டுள்ளன, மேலும் அவை குறிப்பிட்ட உறுதிமொழிகளை சுட்டிக்காட்டுகின்றன. தற்போதைய கிளை சிறப்பு குறிப்பால் அடையாளம் காணப்படுகிறது. + HEAD, இது அந்த கிளையுடன் "இணைக்கப்பட்டுள்ளது". இந்த படத்தில், ஐந்து அண்மைக் கால உறுதிமொழிகள் காட்டப்பட்டுள்ளன, ed489 மிக அண்மைக் காலது. + முதன்மை (தற்போதைய கிளை) இந்த உறுதிமொழிடை சுட்டிக்காட்டுகிறது, அதே நேரத்தில் + நிலையான (மற்றொரு கிளை) முதன்மையின் மூதாதையரை உறுதிமொழியை சுட்டிக்காட்டுகிறது.

    + +

    விரிவாக கட்டளைகள்

    + +

    வேறுபாடு

    + +

    உறுதிமொழிகளுக்கு இடையிலான வேறுபாடுகளைப் பார்க்க பல்வேறு வழிகள் உள்ளன. கீழே உள்ளன சில பொதுவான எடுத்துகாட்டுகள். இந்த கட்டளைகளில் ஏதேனும் விருப்பமாக கூடுதல் வாதங்கள் எடுக்கலாம் பெயரிடப்பட்ட கோப்புகளுக்கு வேறுபாடுகளைக் கட்டுப்படுத்தும் கோப்பு பெயர்.

    + +
    + +

    உறுதிமொழி

    + +

    நீங்கள் உறுதிமொழியும்போது, மேடையிலிருந்து கோப்புகளைப் பயன்படுத்தி ஒரு புதிய உறுதிமொழி பொருளை அறிவிலி உருவாக்குகிறது மற்றும் தற்போதைய உறுதிமொழிக்கு பெற்றோராய் அமைக்கிறது. பின்னர் அது தற்போதைய கிளையை இந்த புதிய உறுதிமொழிக்கு சுட்டிக்காட்டுகிறது. கீழே உள்ள படத்தில், + முதன்மைஎன்பது தற்போதைய கிளை. கட்டளை இயக்கப்படுவதற்கு முன்பு, முதன்மை சுட்டிக்காட்டப்பட்டது + ed489. பின்னர், புதிய உறுதிமொழி, f0cec, உருவாக்கப்பட்டது, ed489 பெற்றோர் உடன், பின்னர் முதன்மை புதிய உறுதிமொழிக்கு நகர்த்தப்பட்டது. +

    + +
    + +

    தற்போதைய கிளை வேறு ஒன்றின் மூதாதையராக இருந்தாலும் இதே செயல்முறை நிகழ்கிறது. கீழே, நிலையான கிளையில் ஒரு உறுதிமொழி நிகழ்கிறது , இது ஒரு முதன்மையின் மூதாதையர், இதன் விளைவாக 1800b. அதன்பிறகு, + நிலையானது இனி முதன்மையின் மூதாதையர் அல்ல. இரண்டு வரலாறுகளை சேர்க்க, ஒரு merge (அல்லது rebase) + தேவைப்படும்.

    + +
    + +

    சில நேரங்களில் ஒரு உறுதிமொழியில் தவறு செய்யப்பட்டால், இதை சரிசெய்வது எளிது இந்த கட்டளையுடன் + git commit --amend. இந்த கட்டளையை நீங்கள் பயன்படுத்தும்போது, அறிவிலி தற்போதைய உறுதிமொழி உள்ள அதே பெற்றோருடன் ஒரு புதிய உறுதிமொழி உருவாக்குகிறது. (பழைய உறுதிமொழியை வேறு எதுவும் குறிப்பிடப்படவில்லை என்றால் நிராகரிக்கப்படும்.)

    + +
    + +

    நான்காவது வழக்கு ஒரு தனிமைப்படுத்தப்பட்ட தலையுடன் உறுதிமொழியப்படுகிறது, பின்னர் விளக்கப்பட்டது.

    + +

    சரிபார்

    + +

    சரிபார் கட்டளையானது, வரலாற்றிலிருந்து (அல்லது மேடையிலிருந்து) கோப்புகளை வேலை செய்யும் கோப்பகத்திற்கு நகலெடுக்கவும், விருப்பப்படி கிளைகளை மாற்றவும் பயன்படுத்தப்படுகிறது.

    + +

    ஒரு கோப்புப் பெயர் (மற்றும்/அல்லது -p) கொடுக்கப்படும்போது, ​​அறிவிலி அந்தக் கோப்புகளை கொடுக்கப்பட்ட உறுதிமொழியிலிருந்து மேடை மற்றும் பணி கோப்பகத்திற்கு நகலெடுக்கிறது. எடுத்துக்காட்டாக, git checkout HEAD~ பூ.சி பூ.சி கோப்பை HEAD~ (தற்போதைய உறுதிமொழியின் பெற்றோர்) எனப்படும் உறுதிமொழியிலிருந்து பணி கோப்பகத்திற்கு நகலெடுக்கிறது, மேலும் அதை மேடைப்படுத்துகிறது. (உறுதிமொழி பெயர் எதுவும் கொடுக்கப்படவில்லை என்றால், கோப்புகள் மேடையிலிருந்து நகலெடுக்கப்படுகின்றன.) தற்போதைய கிளை மாற்றப்படவில்லை என்பதை நினைவில் கொள்க.

    + +
    + +

    ஒரு கோப்புப் பெயர் கொடுக்கப்படாமல், குறிப்பு (உள்ளக) கிளையாக இருக்கும்போது, ​​தலை அந்தக் கிளைக்கு நகர்த்தப்படும் (அதாவது, நாம் அந்தக் கிளைக்கு "மாறுகிறோம்"), பின்னர் மேடை மற்றும் பணி கோப்பகம் அந்த உறுதிமொழியின் உள்ளடக்கங்களுடன் பொருந்துமாறு அமைக்கப்படும். புதிய உறுதிமொழியில் (a47c3 கீழே) இருக்கும் எந்தக் கோப்பும் நகலெடுக்கப்படும்; பழைய உறுதிமொழியில் (ed489) இருக்கும் ஆனால் புதியதில் இல்லாத எந்தக் கோப்பும் நீக்கப்படும்; மேலும் இரண்டிலும் இல்லாத எந்த கோப்பும் புறக்கணிக்கப்படும்.

    + +
    + +

    ஒரு கோப்புப் பெயர் கொடுக்கப்படவில்லை மற்றும் குறிப்பு ஒரு (உள்ளக) கிளையாக இல்லாதபோது — அது ஒரு குறிப்பு, தொலை கிளை, ஒரு சா-1 அடையாளம் அல்லது முதன்மை~3 போன்றது — நமக்கு ஒரு பெயரிலி கிளை கிடைக்கிறது, இது ஒரு பிரிக்கப்பட்ட தலை என்று அழைக்கப்படுகிறது. வரலாற்றைச் சுற்றித் குதிப்பதற்கு இது பயனுள்ளதாக இருக்கும். நீங்கள் அறிவிலியின் பதிப்பு 1.6.6.1 ஐ தொகுக்க விரும்புகிறீர்கள் என்று வைத்துக்கொள்வோம். நீங்கள் git checkout v1.6.6.1 (இது ஒரு குறிப்பு, ஒரு கிளை அல்ல), தொகுக்கலாம், நிறுவலாம், பின்னர் மற்றொரு கிளைக்கு மாறலாம், git checkout முதன்மை. இருப்பினும், பிரிக்கப்பட்ட தலையுடன் உறுதிமொழிதல் சற்று வேறுபட்டு செயல்படுகிறது; இது கீழே கொடுக்கப்பட்டிருக்கும்.

    + +
    + +

    பிரிக்கப்பட்ட தலையுடன் உறுதிமொழிதல்

    + +

    தலை பிரிக்கப்பட்டிருக்கும் போது, ​​பெயரிடப்பட்ட எந்த கிளையும் புதுப்பிக்கப்படாவிட்டால், உறுதிமொழிகள் இயல்பாக வேலை செய்கின்றன. (இதை நீங்கள் ஒரு பெயரிலி கிளை என்று நினைக்கலாம்.)

    + +
    + +

    வேறு ஏதாவது ஒன்றைச் சரிபார்த்தவுடன், முதன்மை என்று வைத்துகொள்ளுங்கள், உறுதிமொழி (மறைமுகமாக) வேறு எதனாலும் குறிப்பிடப்படாது, மேலும் தொலைந்து போகும். கட்டளைக்குப் பிறகு, 2eecb ஐக் குறிக்கும் எதுவும் இல்லை என்பதை நினைவில் கொள்க.

    + +
    + +

    மறுபுறம், நீங்கள் இந்த நிலையைச் சேமிக்க விரும்பினால், git checkout -b பெயரைப் பயன்படுத்தி ஒரு புதிய பெயரிடப்பட்ட கிளையை உருவாக்கலாம்.

    + +
    + +

    மீட்டமை

    + +

    மீட்டமை கட்டளை தற்போதைய கிளையை வேறொரு நிலைக்கு நகர்த்துகிறது, மேலும் விருப்பப்படி மேடை மற்றும் பணி கோப்பகத்தைப் புதுப்பிக்கிறது. இது பணி கோப்பகத்தைத் தொடாமல் வரலாற்றிலிருந்து மேடைக்கு கோப்புகளை நகலெடுக்கவும் பயன்படுகிறது.

    + +

    கோப்பு பெயர்கள் இல்லாமல் ஒரு உறுதிமொழி கொடுக்கப்பட்டால், தற்போதைய கிளை அந்த உறுதிமொழிக்கு நகர்த்தப்படும், பின்னர் இந்த உறுதிமொழியுடன் பொருந்துமாறு மேடை புதுப்பிக்கப்படும். + --hard கொடுக்கப்பட்டால், பணி கோப்பகமும் புதுப்பிக்கப்படும். + --soft கொடுக்கப்பட்டால், இரண்டும் புதுப்பிக்கப்படாது.

    + +
    + +

    ஒரு உறுதிமொழி கொடுக்கப்படவில்லை என்றால், அது இயல்புநிலையாக தலையாக இருக்கும். இந்த வழக்கில், கிளை நகர்த்தப்படவில்லை, ஆனால் மேடை (மற்றும் விருப்பப்படி பணி கோப்பகம், --hard கொடுக்கப்பட்டால்) கடைசி உறுதிமொழியின் உள்ளடக்கங்களுக்கு மீட்டமைக்கப்படும்.

    + +
    + +

    ஒரு கோப்புப் பெயர் (மற்றும்/அல்லது -p) கொடுக்கப்பட்டால், கட்டளை ஒரு கோப்புப் பெயருடன் சரிபார் போலவே செயல்படும், ஆனால் மேடை (பணி கோப்பகம் அல்ல) மட்டுமே புதுப்பிக்கப்படும். (தலை என்பதற்குப் பதிலாக, கோப்புகளை எடுக்க வேண்டிய உறுதிமொழியையும் நீங்கள் குறிப்பிடலாம்.)

    + +
    + +

    ஒன்றிணை

    + +

    ஒரு ஒன்றிணை, மற்ற உறுதிமொழிகளிலிருந்து மாற்றங்களை உள்ளடக்கிய ஒரு புதிய உறுதிமொழியை உருவாக்குகிறது. ஒன்றிணைப்பதற்கு முன், மேடை தற்போதைய உறுதிமொழியுடன் பொருந்த வேண்டும். அற்பமான வழக்கு என்பது மற்ற உறுதிமொழி தற்போதைய உறுதிமொழியின் மூதாதையராக இருந்தால், அந்தச் சந்தர்ப்பத்தில் எதுவும் செய்யப்படாது. அடுத்த மிக எளிமையானது, தற்போதைய உறுதிமொழி மற்ற உறுதிமொழியின் மூதாதையராக இருந்தால். இதன் விளைவாக வேகமாக முன்னோக்கிச் செல்லும் இணைப்பு ஏற்படுகிறது. குறிப்பு வெறுமனே நகர்த்தப்படுகிறது, பின்னர் புதிய உறுதிமொழி சரிபார்க்கப்படுகிறது.

    + +
    + +

    இல்லையெனில், ஒரு "உண்மையான" இணைப்பு ஏற்பட வேண்டும். நீங்கள் வேறு திறமையான வழிமுறைகளைத் தேர்வு செய்யலாம்,ஆனால் இயல்புநிலை "மறுநிகழ்வு" இணைப்பைச் செய்வதாகும், இது அடிப்படையில் தற்போதைய உறுதிமொழியையும் (கீழே உள்ள ed489), மற்ற உறுதிமொழியையும் (33104), அவற்றின் பொதுவான மூதாதையரை (b325c) எடுத்துக்கொண்டு, மூன்று-வழி இணைப்பைச் செய்கிறது.முடிவு பணி கோப்பகத்திலும் மேடையிலும் சேமிக்கப்படுகிறது, பின்னர் புதிய உறுதிமொழிக்கான கூடுதல் பெற்றோர் (33104) உடன் ஒரு உறுதிமொழி ஏற்படுகிறது. +

    + +
    + +

    கனி எடு

    + +

    கனி-எடு கட்டளை ஒரு உறுதிமொழியை "நகலெடுக்கிறது", தற்போதைய கிளையில் மற்றொரு உறுதிமொழியைப் போலவே அதே செய்தி மற்றும் ஒட்டுடன் ஒரு புதிய உறுதிமொழியை உருவாக்குகிறது.

    + +
    + +

    மறுதளம்

    + +

    பல கிளைகளை இணைப்பதற்கான ஒன்றிணைக்கு மாற்றாக ஒரு மறுதளம் உள்ளது. ஒரு ஒன்றிணைப்பு இரண்டு பெற்றோர்களுடன் ஒரு ஒற்றை உறுதிமொழியை உருவாக்குகிறது, இது ஒரு நேரியல் அல்லாத வரலாற்றை விட்டுச்செல்கிறது, அதே நேரத்தில் ஒரு மறுதளம் தற்போதைய கிளையிலிருந்து மற்றொன்றுக்கு உறுதிமொழிகளை மீண்டும் இயக்கி, ஒரு நேரியல் வரலாற்றை விட்டுச்செல்கிறது. பிழிவில், இது ஒரு வரிசையில் பல கனிகளை எடுப்பதற்கான ஒரு தானியங்கி வழியாகும்.

    + +
    + +

    மேலே உள்ள கட்டளை, தலைப்பில் இருக்கும் ஆனால் முதன்மையில் இல்லாத அனைத்து உறுதிமொழிகளையும் (அதாவது 169a6 மற்றும் 2c33a) எடுத்து, அவற்றை முதன்மையில் மீண்டும் இயக்கி, பின்னர் கிளைத் தலையை புதிய முனைக்கு நகர்த்துகிறது. பழைய உறுதிமொழிகள் இனி குறிப்பிடப்படாவிட்டால் அவை குப்பை சேகரிக்கப்படும் என்பதை நினைவில் கொள்க.

    + +

    எவ்வளவு தூரம் பின்னோக்கிச் செல்ல வேண்டும் என்பதைக் கட்டுப்படுத்த, --onto விருப்பத்தைப் பயன்படுத்தவும். பின்வரும் கட்டளை தற்போதைய கிளையில் முதன்மையில் 169a6 (விலக்கப்பட்டது), அதாவது 2c33a முதல் மிகச் அண்மைக் கால உறுதிமொழிகளை மீண்டும் இயக்குகிறது.

    + +
    + +

    git rebase --interactive உள்ளது, இது உறுதிமொழிகளை மீண்டும் இயக்குவதை விட மிகவும் சிக்கலான செயல்களைச் செய்ய அனுமதிக்கிறது, அதாவது உறுதிமொழிகளை கைவிடுதல், மறுவரிசைப்படுத்துதல், மாற்றியமைத்தல் மற்றும் நசுக்குதல். இதற்கு வரைய தெளிவான படம் எதுவும் இல்லை; மேலும் விவரங்களுக்கு git-rebase(1) ஐப் பார்க்கவும்.

    + +

    தொழில்நுட்ப குறிப்புகள்

    + +

    கோப்புகளின் உள்ளடக்கங்கள் உண்மையில் குறியீட்டில் (.git/index) அல்லது உறுதிமொழி பொருள்களில் சேமிக்கப்படுவதில்லை. மாறாக, ஒவ்வொரு கோப்பும் பொருள் தரவுத்தளத்தில் (.git/objects) ஒரு blob ஆக சேமிக்கப்படுகிறது, இது அதன் SHA-1 ஹாஷால் அடையாளம் காணப்படுகிறது. குறியீட்டு கோப்பு தொடர்புடைய blob இன் அடையாளங்காட்டியுடன் கோப்பு பெயர்களையும், வேறு சில தரவையும் பட்டியலிடுகிறது. உறுதிமொழிகளுக்கு, கூடுதல் தரவு வகை, ஒரு மரம் உள்ளது, இது அதன் ஹாஷாலும் அடையாளம் காணப்படுகிறது. மரங்கள் பணி கோப்பகத்தில் உள்ள கோப்பகங்களுடன் ஒத்திருக்கும், மேலும் அந்த கோப்பகத்தில் உள்ள ஒவ்வொரு கோப்பு பெயருக்கும் தொடர்புடைய மரங்கள் மற்றும் blobகளின் பட்டியலைக் கொண்டிருக்கும். ஒவ்வொரு உறுதிமொழிக்கும் அதன் உயர்மட்ட மரத்தின் அடையாளங்காட்டியைச் சேமிக்கிறது, இது அந்த உறுதிமொழியுடன் தொடர்புடைய அனைத்து blobகளையும் பிற மரங்களையும் கொண்டுள்ளது.

    + +

    நீங்கள் ஒரு பிரிக்கப்பட்ட தலையைப் பயன்படுத்தி ஒரு உறுதிமொழியைச் செய்தால், கடைசி உறுதிமொழி உண்மையில் ஏதோவொன்றால் குறிப்பிடப்படுகிறது: தலைக்கான குறிபதிவு. இருப்பினும், இது சிறிது நேரத்திற்குப் பிறகு காலாவதியாகிவிடும், எனவே உறுதிமொழி இறுதியில் குப்பை சேகரிக்கப்படும், git commit --amend அல்லது git rebase உடன் நிராகரிக்கப்பட்ட உறுதிமொழிகளைப் போலவே.

    + +

    ஒத்திகை: கட்டளைகளின் விளைவைப் பார்த்தல்

    + +

    டி3 உடன் அறிவிலி கருத்துக்களை காட்சிப்படுத்துதல் எவ்வாறு காட்சிக்கு உருவகப்படுத்துகிறது என்பதைப் போலவே, கட்டளையின் விளைவை நீங்கள் நிகழ்நேரத்தில் காணக்கூடிய வகையில், ஒரு களஞ்சியத்தில் ஏற்படும் மாற்றங்களைப் பற்றி பின்வருவது உங்களுக்கு விளக்குகிறது. இது உங்களுக்கு பயனுள்ளதாக இருக்கும் என்று நம்புகிறேன். +

    + +

    சில களஞ்சியத்தை உருவாக்குவதன் மூலம் தொடங்கவும்:

    + +
    $ git init பூ
    +$ cd பூ
    +$ echo 1 > என்கோப்பு
    +$ git add என்கோப்பு
    +$ git commit -m "பதிப்பு 1"
    +
    + +

    இப்போது, தகவலைக் காட்ட நமக்கு உதவ பின்வரும் செயல்பாடுகளை வரையறுக்கவும்:

    + +
    நிலையைக்_காட்டு() {
    +  echo "தலை:     $(git cat-file -p HEAD:என்கோப்பு)"
    +  echo "மேடை:    $(git cat-file -p :என்கோப்பு)"
    +  echo "பணிமரம்: $(cat என்கோப்பு)"
    +}
    +
    +தெடக்க_அமைப்பு() {
    +  echo 3 > என்கோப்பு
    +  git add என்கோப்பு
    +  echo 4 > என்கோப்பு
    +  நிலையைக்_காட்டு
    +}
    +
    + +

    தொடக்கத்தில், எல்லாம் பதிப்பு 1 இல் உள்ளது.

    + +
    $ நிலையைக்_காட்டு
    +தலை:     1
    +மேடை:    1
    +பணிமரம்: 1
    +
    + +

    நாம் சேர்க்கும்போதும், உறுதிமொழி செய்யும்போதும் நிலை மாறுவதைப் பார்க்கலாம்.

    + +
    $ echo 2 > என்கோப்பு
    +$ நிலையைக்_காட்டு
    +தலை:     1
    +மேடை:    1
    +பணிமரம்: 2
    +$ git add என்கோப்பு
    +$ நிலையைக்_காட்டு
    +தலை:     1
    +மேடை:    2
    +பணிமரம்: 2
    +$ git commit -m "பதிப்பு 2"
    +[முதன்மை 4156116] பதிப்பு 2
    + 1 கோப்பு மாற்றப்பட்டுள்ளது, 1 நுழைவு(+), 1 நீக்கம்(-)
    +$ நிலையைக்_காட்டு
    +தலை:     2
    +மேடை:    2
    +பணிமரம்: 2
    +
    + +

    இப்போது, ​​மூன்றும் வேறுபட்ட ஒரு தெடக்க நிலையை உருவாக்குவோம்.

    + +
    $ தெடக்க_அமைப்பு
    +தலை:     2
    +மேடை:    3
    +பணிமரம்: 4
    +
    + +

    ஒவ்வொரு கட்டளையும் என்ன செய்கிறது என்பதைப் பார்ப்போம். அவை மேலே உள்ள வரைபடங்களுடன் பொருந்துவதை நீங்கள் காண்பீர்கள்.

    + +

    git reset -- என்கோப்பு தலையிலிருந்து மேடைக்கு நகலெடுக்கிறது:

    + +
    $ தெடக்க_அமைப்பு
    +தலை:     2
    +மேடை:    3
    +பணிமரம்: 4
    +$ git reset -- என்கோப்பு
    +மீட்டமைக்கு பிறகு மேடையற்ற மாற்றங்கள்:
    +M   என்கோப்பு
    +$ நிலையைக்_காட்டு
    +தலை:     2
    +மேடை:    2
    +பணிமரம்: 4
    +
    + +

    git checkout -- என்கோப்பு மேடையிலிருந்து பணிமரத்துக்கு நகலெடுக்கிறது:

    + +
    $ தெடக்க_அமைப்பு
    +தலை:     2
    +மேடை:    3
    +பணிமரம்: 4
    +$ git checkout -- என்கோப்பு
    +$ நிலையைக்_காட்டு
    +தலை:     2
    +மேடை:    3
    +பணிமரம்: 3
    +
    + +

    git checkout HEAD -- என்கோப்பு தலையிலிருந்து மேடைக்கும் மற்றும் பணிமரத்துக்கும் நகலெடுக்கிறது:

    + +
    $ தெடக்க_அமைப்பு
    +தலை:     2
    +மேடை:    3
    +பணிமரம்: 4
    +$ git checkout HEAD -- என்கோப்பு
    +$ நிலையைக்_காட்டு
    +தலை:     2
    +மேடை:    2
    +பணிமரம்: 2
    +
    + +

    git commit என்கோப்பு பணிமரத்திலிருந்து மேடைக்கும் மற்றும் தலைக்கும் நகலெடுக்கிறது:

    + +
    $ தெடக்க_அமைப்பு
    +தலை:     2
    +மேடை:    3
    +பணிமரம்: 4
    +$ git commit என்கோப்பு -m "பதிப்பு 4"
    +[முதன்மை 679ff51] பதிப்பு 4
    + 1 கோப்பு மாற்றப்பட்டுள்ளது, 1 நுழைவு(+), 1 நீக்கம்(-)
    +$ நிலையைக்_காட்டு
    +தலை:     4
    +மேடை:    4
    +பணிமரம்: 4
    +
    + +
    + +

    பதிப்புரிமை © 2010, + மார்க் லோடாடோ. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம். + சப்பானிய மொழிபெயர்ப்பு © 2010, + காசு யமமோட்டோ. + கொரிய மொழிபெயர்ப்பு © 2011, + சீன் லீ. + ரசியன் மொழிபெயர்ப்பு © 2012, + அலெக்ச் சைச்சேவ். + பிரெஞ்சு மொழிபெயர்ப்பு © 2012, + மைக்கேல் லெஃப்ராங்க். + சீன மொழிபெயர்ப்பு © 2012, + விச். + சுபானிசு மொழிபெயர்ப்பு © 2012, + லூகாச் விடேலா. + இத்தாலிய மொழிபெயர்ப்பு © 2012, + டேனியல் லொன்டெரோ. + செர்மன் மொழிபெயர்ப்பு © 2013, + மார்ட்டின் ஃபங்க். + ச்லோவாக் மொழிபெயர்ப்பு © 2013, + லுடோவிட் லூசெனிக். + போர்த்துகீசியம் மொழிபெயர்ப்பு © 2014, + குச்டாவோ டி ஒலிவேரா. + பாரம்பரிய சீன மொழிபெயர்ப்பு © 2015, + பீட்டர் டேவ், வணக்கம். + போலிசு மொழிபெயர்ப்பு © 2017, + எமில் வைபிச். +

    + +

    + This work is licensed under a இந்த வேலை ஒரு கற்பனை பொது-பண்புகள்-வணிகம் அல்லாத-ஒன்றுபோல பகிர் 3.0 ஐக்கிய அமெரிக்கா குடியரசு உரிமம் கீழ் உரிமம் பெற்றது..

    + +

    பிற மொழில் மொழிபெயர்க்க விரும்பமா?

    + + + diff --git a/index-vi.html b/index-vi.html index 5cc2822..696404f 100644 --- a/index-vi.html +++ b/index-vi.html @@ -25,6 +25,7 @@

    Tham chiếu Git bằng hình ảnh

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -344,6 +345,8 @@

    Chú ý kỹ thuật

    Mark Lodato. Bản dịch tiếng Việt © 2013, Hoat Le. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    图解Git

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -229,6 +230,8 @@

    技术说明

    Mark Lodato. Chinese translation © 2012, wych. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    本著作系采用创用CC 姓名标示-非商业性-相同方式分享3.0 美国授权条款授权。

    diff --git a/index-zh-tw.html b/index-zh-tw.html index 154a67e..8fd5d44 100644 --- a/index-zh-tw.html +++ b/index-zh-tw.html @@ -25,6 +25,7 @@

    圖解Git

  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • @@ -229,6 +230,8 @@

    技術說明

    Mark Lodato. Traditional Chinese translation © 2015, Peter Dave Hello. + தமிழ் மொழிபெயர்ப்பு © 2025, + தமிழ்நேரம்.

    本著作系採用創用CC 姓名標示-非商業性-相同方式分享3.0 美國授權條款授權。

    diff --git a/index.html b/index.html index ff3b68f..48940d8 100644 --- a/index.html +++ b/index.html @@ -19,6 +19,7 @@
  • Português
  • Русский
  • Slovenčina
  • +
  • தமிழ்
  • Tiếng Việt
  • 简体中文
  • 正體中文
  • From 3780eb31d43c0ee0ec6e4ab986b7881fc3be780e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=A4=E0=AE=AE=E0=AE=BF=E0=AE=B4=E0=AF=8D=20=E0=AE=A8?= =?UTF-8?q?=E0=AF=87=E0=AE=B0=E0=AE=AE=E0=AF=8D?= Date: Sat, 10 May 2025 22:32:26 +0530 Subject: [PATCH 2/7] Updated Readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e733814..61ed4ed 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ Slovak translation © 2013, [Ľudovít Lučenič](https://github.com/lluceni Portuguese translation © 2014, [Gustavo de Oliveira](mailto:goliveira5d@gmail.com). Traditional Chinese translation © 2015, [Peter Dave Hello](https://github.com/PeterDaveHello). Polish translation © 2017, [Emil Wypych](mailto:wypychemil@gmail.com). +Tamil translation © 2025, [தமிழ்நேரம்](https://TamilNeram.github.io). This work is licensed under a [Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States From b396cbb4b084cdecb7ba8f35557c7c94856afe4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=A4=E0=AE=AE=E0=AE=BF=E0=AE=B4=E0=AF=8D=20=E0=AE=A8?= =?UTF-8?q?=E0=AF=87=E0=AE=B0=E0=AE=AE=E0=AF=8D?= Date: Sun, 11 May 2025 06:27:57 +0530 Subject: [PATCH 3/7] updated make for tamil --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index b3ca129..08c1fa6 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,7 @@ STATIC := \ index-pt.html \ index-ru.html \ index-sk.html \ + index-ta.html \ index-vi.html \ index-zh-cn.html \ index-zh-tw.html \ From bd94db622068da5277b612da7652994144ed3a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=A4=E0=AE=AE=E0=AE=BF=E0=AE=B4=E0=AF=8D=20=E0=AE=A8?= =?UTF-8?q?=E0=AF=87=E0=AE=B0=E0=AE=AE=E0=AF=8D?= Date: Sun, 11 May 2025 06:37:08 +0530 Subject: [PATCH 4/7] updated gitworkflow for latest ubuntu --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 99f850f..678094b 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.10 steps: - name: Checkout uses: actions/checkout@v2 From 021c14c34782fbe02454f4e2e7d25a2467107e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=A4=E0=AE=AE=E0=AE=BF=E0=AE=B4=E0=AF=8D=20=E0=AE=A8?= =?UTF-8?q?=E0=AF=87=E0=AE=B0=E0=AE=AE=E0=AF=8D?= Date: Sun, 11 May 2025 07:42:14 +0530 Subject: [PATCH 5/7] any ubuntu --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 678094b..1321f78 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: deploy: - runs-on: ubuntu-24.10 + runs-on: ubuntu steps: - name: Checkout uses: actions/checkout@v2 From d9e3f49ee5f5c5aa138c4c93c5f38ed8a47c24f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=A4=E0=AE=AE=E0=AE=BF=E0=AE=B4=E0=AF=8D=20=E0=AE=A8?= =?UTF-8?q?=E0=AF=87=E0=AE=B0=E0=AE=AE=E0=AF=8D?= Date: Sun, 11 May 2025 07:46:43 +0530 Subject: [PATCH 6/7] ubuntu-latest --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 1321f78..624fda3 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: deploy: - runs-on: ubuntu + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 From 7e68e8bef9d0132bee8f5c741bfccf81d16f919f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=A4=E0=AE=AE=E0=AE=BF=E0=AE=B4=E0=AF=8D=20=E0=AE=A8?= =?UTF-8?q?=E0=AF=87=E0=AE=B0=E0=AE=AE=E0=AF=8D?= Date: Mon, 19 May 2025 12:22:48 +0530 Subject: [PATCH 7/7] copy for tamil --- Makefile | 5 +- ta/checkout-after-detached.tex | 21 + ta/checkout-b-detached.tex | 26 + ta/checkout-branch.tex | 20 + ta/checkout-detached.tex | 20 + ta/checkout-files.tex | 18 + ta/cherry-pick.tex | 27 + ta/commit-amend.tex | 27 + ta/commit-detached.tex | 25 + ta/commit-main.tex | 21 + ta/commit-stable.tex | 26 + ta/conventions.tex | 901 ++++++++++++++++++ ta/goatcounter.js | 269 ++++++ ta/merge-ff.tex | 21 + ta/merge.tex | 42 + ta/rebase-onto.tex | 32 + ta/rebase.tex | 34 + ta/reset-commit.tex | 22 + ta/reset-files.tex | 17 + ta/reset.tex | 18 + ta/visual-git-guide.css | 92 ++ ta/visual-git-guide.js | 51 + ...340\256\276\340\256\237\340\257\201-2.tex" | 25 + ...2\340\256\276\340\256\237\340\257\201.tex" | 25 + ...2\340\257\212\340\256\244\340\257\201.tex" | 155 +++ ...2\340\256\276\340\256\237\340\257\201.tex" | 21 + 26 files changed, 1960 insertions(+), 1 deletion(-) create mode 100644 ta/checkout-after-detached.tex create mode 100644 ta/checkout-b-detached.tex create mode 100644 ta/checkout-branch.tex create mode 100644 ta/checkout-detached.tex create mode 100644 ta/checkout-files.tex create mode 100644 ta/cherry-pick.tex create mode 100644 ta/commit-amend.tex create mode 100644 ta/commit-detached.tex create mode 100644 ta/commit-main.tex create mode 100644 ta/commit-stable.tex create mode 100644 ta/conventions.tex create mode 100644 ta/goatcounter.js create mode 100644 ta/merge-ff.tex create mode 100644 ta/merge.tex create mode 100644 ta/rebase-onto.tex create mode 100644 ta/rebase.tex create mode 100644 ta/reset-commit.tex create mode 100644 ta/reset-files.tex create mode 100644 ta/reset.tex create mode 100644 ta/visual-git-guide.css create mode 100644 ta/visual-git-guide.js create mode 100644 "ta/\340\256\205\340\256\237\340\256\277\340\256\252\340\257\215\340\256\252\340\256\237\340\257\210-\340\256\252\340\256\257\340\256\251\340\257\215\340\256\252\340\256\276\340\256\237\340\257\201-2.tex" create mode 100644 "ta/\340\256\205\340\256\237\340\256\277\340\256\252\340\257\215\340\256\252\340\256\237\340\257\210-\340\256\252\340\256\257\340\256\251\340\257\215\340\256\252\340\256\276\340\256\237\340\257\201.tex" create mode 100644 "ta/\340\256\252\340\257\212\340\256\244\340\257\201.tex" create mode 100644 "ta/\340\256\265\340\257\207\340\256\261\340\257\201\340\256\252\340\256\276\340\256\237\340\257\201.tex" diff --git a/Makefile b/Makefile index 08c1fa6..f91434b 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,10 @@ FILES := \ rebase-onto \ reset \ reset-commit \ - reset-files + reset-files\ + ta/அடிப்படை-பயன்பாடு\ + ta/அடிப்படை-பயன்பாடு-2\ + ta/reset-files STATIC := \ goatcounter.js \ diff --git a/ta/checkout-after-detached.tex b/ta/checkout-after-detached.tex new file mode 100644 index 0000000..53754e4 --- /dev/null +++ b/ta/checkout-after-detached.tex @@ -0,0 +1,21 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \commit 2eecb (2) -> B; + \branch main -> E; + \branch stable -> A; + \olddetachedHEAD -> 2; + \HEAD -> main; + + \node [cmd] at (0,3.75) {git checkout main}; + + \path [line] + (E) edge [bend left=20] (index) + (E) edge [bend left=35] (work) + (old HEAD) edge [dashed, bend left=15] (HEAD label) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/checkout-b-detached.tex b/ta/checkout-b-detached.tex new file mode 100644 index 0000000..103d28b --- /dev/null +++ b/ta/checkout-b-detached.tex @@ -0,0 +1,26 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \commit 2eecb (2) -> B; + \branch main -> E; + \branch stable -> A; + \olddetachedHEAD -> 2; + + \begin{pgfonlayer}{HEAD} + \node [branch, double shadow, above right=.4\g of 2, draw=none, fill=none] + {}; + \end{pgfonlayer} + \node [branch, above right=.4\g of 2] (new) {new}; + \path [branch line] (new) edge (2); + \HEAD -> new; + + \node [cmd] at (-3,3.75) {git checkout -b new}; + + \path [line] + (old HEAD) edge [dashed, bend left=15] (HEAD label) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/checkout-branch.tex b/ta/checkout-branch.tex new file mode 100644 index 0000000..2ca32c8 --- /dev/null +++ b/ta/checkout-branch.tex @@ -0,0 +1,20 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch main -> E; + \branch stable -> A; + \oldHEAD -> main; + \HEAD -> stable; + + \node [cmd] at (0, 3.75) {git checkout stable}; + + \path [line] + (A) edge [bend right=22] (index) + (A) edge [bend right=35] (work) + (old HEAD label) edge [dashed, bend right=10] (HEAD label) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/checkout-detached.tex b/ta/checkout-detached.tex new file mode 100644 index 0000000..41bf57e --- /dev/null +++ b/ta/checkout-detached.tex @@ -0,0 +1,20 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch main -> E; + \branch stable -> A; + \oldHEAD -> main; + \detachedHEAD -> B; + + \node [cmd] at (0, 3.75) {git checkout main\~{}3}; + + \path [line] + (B) edge [bend right=20] (index) + (B) edge [bend right=40] (work) + (old HEAD label) edge [dashed, bend right=10] (HEAD) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/checkout-files.tex b/ta/checkout-files.tex new file mode 100644 index 0000000..c3034c4 --- /dev/null +++ b/ta/checkout-files.tex @@ -0,0 +1,18 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch main -> E; + \branch stable -> A; + \HEAD -> main; + + \node [cmd] at (0, 3.75) {git checkout HEAD\~{} \emph{files}}; + + \path [line] + (D) edge [bend left=20] (index) + (D) edge [bend left=45] (work) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/cherry-pick.tex b/ta/cherry-pick.tex new file mode 100644 index 0000000..d11abe9 --- /dev/null +++ b/ta/cherry-pick.tex @@ -0,0 +1,27 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \newcommit f142b (F) -> E; + \commit 169a6 (1) -> A; + \commit 2c33a (2) -> 1; + \commit 3ba22 (3) -> 2; + \branch topic -> 3; + + \oldbranch main -> E; + \oldHEAD -> old main; + \branch main -> F; + \HEAD -> main; + + \node [cmd] at (0, 3.75) {git cherry-pick 2c33a}; + + \path [line] + (F) edge [bend left=20] (index) + (F) edge [bend left=30] (work) + (old HEAD) edge [dashed, bend left=50] (HEAD) + (2) edge [loosely dashed, bend right=35] (F) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/commit-amend.tex b/ta/commit-amend.tex new file mode 100644 index 0000000..5b196a8 --- /dev/null +++ b/ta/commit-amend.tex @@ -0,0 +1,27 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + + % trick the code to draw the commit below instead of above + \pgfkeys{/child count/D=-1} + \newcommit 4ca87 (4) -> D; + + % this is a special case, so I won't make high level commands for this + \refbelow [branch] "main" : main -> 4; + \addHEADbelow [attached HEAD] "HEAD" : HEAD -> main; + + \branch stable -> A; + \oldbranch main -> E; + \oldHEAD -> old main; + + \node [cmd] at (0, 3.75) {git commit --amend}; + + \path [line] + (index) edge [bend right=10] (4) + (old HEAD) edge [dashed, bend left=60] (HEAD) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/commit-detached.tex b/ta/commit-detached.tex new file mode 100644 index 0000000..3182f32 --- /dev/null +++ b/ta/commit-detached.tex @@ -0,0 +1,25 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \newcommit 2eecb (2) -> B; + \branch main -> E; + \branch stable -> A; + \olddetachedHEAD -> B; + \detachedHEAD -> 2; + + \node [cmd] at (0, 3.75) {git commit}; + + % Put a white border underneath the line since it croses over the graph. + \path [background line] + ($ (index.north) + (1,0) $) edge [-, bend right=20] + ($ (2.south east) + (-.09,.01) $); + \path [line] + ($ (index.north) + (1,0) $) edge [bend right=20] + ($ (2.south east) + (-.09,.01) $) + (old HEAD) edge [dashed, bend left=15] (HEAD) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/commit-main.tex b/ta/commit-main.tex new file mode 100644 index 0000000..ceb6968 --- /dev/null +++ b/ta/commit-main.tex @@ -0,0 +1,21 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \newcommit f0cec (F) -> E; + \oldbranch main -> E; + \branch main -> F; + \branch stable -> A; + \oldHEAD -> old main; + \HEAD -> main; + + \node [cmd] at (0, 3.75) {git commit}; + + \path [line] + (index) edge [bend right=20] (F) + (old HEAD) edge [dashed, bend left=50] (HEAD) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/commit-stable.tex b/ta/commit-stable.tex new file mode 100644 index 0000000..69e259d --- /dev/null +++ b/ta/commit-stable.tex @@ -0,0 +1,26 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \newcommit 1800b (1) -> A; + \branch main -> E; + \oldbranch stable -> A; + \branch stable -> 1; + \oldHEAD -> old stable; + \HEAD -> stable; + + \node [cmd] at (0, 3.75) {git commit}; + + % Put a white border underneath the line since it croses over the graph. + \path [background line] + ($ (index.north) + (-.8,0) $) edge [-, bend right=13] + ($ (1.south east) + (-.09,.01) $); + \path [line] + ($ (index.north) + (-.8,0) $) edge [bend right=13] + ($ (1.south east) + (-.09,.01) $) + (old HEAD label) edge [dashed, bend left=10] (HEAD label) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/conventions.tex b/ta/conventions.tex new file mode 100644 index 0000000..d8d0e62 --- /dev/null +++ b/ta/conventions.tex @@ -0,0 +1,901 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch stable -> A; + \branch main -> E; + \HEAD -> main; + + \path [>=stealth', draw=black!50, very thick] + (5,3.75) node {reference to current branch} edge [->] (HEAD label) + (6.5,2) node {current branch} edge [->] (main) + (-5,3) node {another branch}\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \commit 2eecb (2) -> B; + \branch main -> E; + \branch stable -> A; + \olddetachedHEAD -> 2; + \HEAD -> main; + + \node [cmd] at (0,3.75) {git checkout main}; + + \path [line] + (E) edge [bend left=20] (index) + (E) edge [bend left=35] (work) + (old HEAD) edge [dashed, bend left=15] (HEAD label) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \commit 2eecb (2) -> B; + \branch main -> E; + \branch stable -> A; + \olddetachedHEAD -> 2; + + \begin{pgfonlayer}{HEAD} + \node [branch, double shadow, above right=.4\g of 2, draw=none, fill=none] + {}; + \end{pgfonlayer} + \node [branch, above right=.4\g of 2] (new) {new}; + \path [branch line] (new) edge (2); + \HEAD -> new; + + \node [cmd] at (-3,3.75) {git checkout -b new}; + + \path [line] + (old HEAD) edge [dashed, bend left=15] (HEAD label) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch main -> E; + \branch stable -> A; + \oldHEAD -> main; + \HEAD -> stable; + + \node [cmd] at (0, 3.75) {git checkout stable}; + + \path [line] + (A) edge [bend right=22] (index) + (A) edge [bend right=35] (work) + (old HEAD label) edge [dashed, bend right=10] (HEAD label) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch main -> E; + \branch stable -> A; + \oldHEAD -> main; + \detachedHEAD -> B; + + \node [cmd] at (0, 3.75) {git checkout main\~{}3}; + + \path [line] + (B) edge [bend right=20] (index) + (B) edge [bend right=40] (work) + (old HEAD label) edge [dashed, bend right=10] (HEAD) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch main -> E; + \branch stable -> A; + \HEAD -> main; + + \node [cmd] at (0, 3.75) {git checkout HEAD\~{} \emph{files}}; + + \path [line] + (D) edge [bend left=20] (index) + (D) edge [bend left=45] (work) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \newcommit f142b (F) -> E; + \commit 169a6 (1) -> A; + \commit 2c33a (2) -> 1; + \commit 3ba22 (3) -> 2; + \branch topic -> 3; + + \oldbranch main -> E; + \oldHEAD -> old main; + \branch main -> F; + \HEAD -> main; + + \node [cmd] at (0, 3.75) {git cherry-pick 2c33a}; + + \path [line] + (F) edge [bend left=20] (index) + (F) edge [bend left=30] (work) + (old HEAD) edge [dashed, bend left=50] (HEAD) + (2) edge [loosely dashed, bend right=35] (F) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + + % trick the code to draw the commit below instead of above + \pgfkeys{/child count/D=-1} + \newcommit 4ca87 (4) -> D; + + % this is a special case, so I won't make high level commands for this + \refbelow [branch] "main" : main -> 4; + \addHEADbelow [attached HEAD] "HEAD" : HEAD -> main; + + \branch stable -> A; + \oldbranch main -> E; + \oldHEAD -> old main; + + \node [cmd] at (0, 3.75) {git commit --amend}; + + \path [line] + (index) edge [bend right=10] (4) + (old HEAD) edge [dashed, bend left=60] (HEAD) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \newcommit 2eecb (2) -> B; + \branch main -> E; + \branch stable -> A; + \olddetachedHEAD -> B; + \detachedHEAD -> 2; + + \node [cmd] at (0, 3.75) {git commit}; + + % Put a white border underneath the line since it croses over the graph. + \path [background line] + ($ (index.north) + (1,0) $) edge [-, bend right=20] + ($ (2.south east) + (-.09,.01) $); + \path [line] + ($ (index.north) + (1,0) $) edge [bend right=20] + ($ (2.south east) + (-.09,.01) $) + (old HEAD) edge [dashed, bend left=15] (HEAD) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \newcommit f0cec (F) -> E; + \oldbranch main -> E; + \branch main -> F; + \branch stable -> A; + \oldHEAD -> old main; + \HEAD -> main; + + \node [cmd] at (0, 3.75) {git commit}; + + \path [line] + (index) edge [bend right=20] (F) + (old HEAD) edge [dashed, bend left=50] (HEAD) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \newcommit 1800b (1) -> A; + \branch main -> E; + \oldbranch stable -> A; + \branch stable -> 1; + \oldHEAD -> old stable; + \HEAD -> stable; + + \node [cmd] at (0, 3.75) {git commit}; + + % Put a white border underneath the line since it croses over the graph. + \path [background line] + ($ (index.north) + (-.8,0) $) edge [-, bend right=13] + ($ (1.south east) + (-.09,.01) $); + \path [line] + ($ (index.north) + (-.8,0) $) edge [bend right=13] + ($ (1.south east) + (-.09,.01) $) + (old HEAD label) edge [dashed, bend left=10] (HEAD label) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch stable -> A; + \branch main -> E; + \HEAD -> main; + + \path [>=stealth', draw=black!50, very thick] + (5,3.75) node {reference to current branch} edge [->] (HEAD label) + (6.5,2) node {current branch} edge [->] (main) + (-5,3) node {another branch} edge [->] (stable) + (-5,-0.5) node {files to go in next commit} edge [->] (index) + (-5,-2) node {files that you ``see''} edge [->] (work) + (5,-1) node [text width=6\g, text badly centered] + {commit objects, identified by SHA-1 hash} + edge [->] (E) + edge [->] (D) + edge [->] (C) + + (-1,2.25) node {child points to parent} edge [->] ($ (B)!.5!(C) $) + ; + +\end{tikzpicture} +\end{document} + +// GoatCounter: https://www.goatcounter.com +// This file (and *only* this file) is released under the ISC license: +// https://opensource.org/licenses/ISC +;(function() { + 'use strict'; + + if (window.goatcounter && window.goatcounter.vars) // Compatibility with very old version; do not use. + window.goatcounter = window.goatcounter.vars + else + window.goatcounter = window.goatcounter || {} + + // Load settings from data-goatcounter-settings. + var s = document.querySelector('script[data-goatcounter]') + if (s && s.dataset.goatcounterSettings) { + try { var set = JSON.parse(s.dataset.goatcounterSettings) } + catch (err) { console.error('invalid JSON in data-goatcounter-settings: ' + err) } + for (var k in set) + if (['no_onload', 'no_events', 'allow_local', 'allow_frame', 'path', 'title', 'referrer', 'event'].indexOf(k) > -1) + window.goatcounter[k] = set[k] + } + + var enc = encodeURIComponent + + // Get all data we're going to send off to the counter endpoint. + var get_data = function(vars) { + var data = { + p: (vars.path === undefined ? goatcounter.path : vars.path), + r: (vars.referrer === undefined ? goatcounter.referrer : vars.referrer), + t: (vars.title === undefined ? goatcounter.title : vars.title), + e: !!(vars.event || goatcounter.event), + s: [window.screen.width, window.screen.height, (window.devicePixelRatio || 1)], + b: is_bot(), + q: location.search, + } + + var rcb, pcb, tcb // Save callbacks to apply later. + if (typeof(data.r) === 'function') rcb = data.r + if (typeof(data.t) === 'function') tcb = data.t + if (typeof(data.p) === 'function') pcb = data.p + + if (is_empty(data.r)) data.r = document.referrer + if (is_empty(data.t)) data.t = document.title + if (is_empty(data.p)) data.p = get_path() + + if (rcb) data.r = rcb(data.r) + if (tcb) data.t = tcb(data.t) + if (pcb) data.p = pcb(data.p) + return data + } + + // Check if a value is "empty" for the purpose of get_data(). + var is_empty = function(v) { return v === null || v === undefined || typeof(v) === 'function' } + + // See if this looks like a bot; there is some additional filtering on the + // backend, but these properties can't be fetched from there. + var is_bot = function() { + // Headless browsers are probably a bot. + var w = window, d = document + if (w.callPhantom || w._phantom || w.phantom) + return 150 + if (w.__nightmare) + return 151 + if (d.__selenium_unwrapped || d.__webdriver_evaluate || d.__driver_evaluate) + return 152 + if (navigator.webdriver) + return 153 + return 0 + } + + // Object to urlencoded string, starting with a ?. + var urlencode = function(obj) { + var p = [] + for (var k in obj) + if (obj[k] !== '' && obj[k] !== null && obj[k] !== undefined && obj[k] !== false) + p.push(enc(k) + '=' + enc(obj[k])) + return '?' + p.join('&') + } + + // Show a warning in the console. + var warn = function(msg) { + if (console && 'warn' in console) + console.warn('goatcounter: ' + msg) + } + + // Get the endpoint to send requests to. + var get_endpoint = function() { + var s = document.querySelector('script[data-goatcounter]') + if (s && s.dataset.goatcounter) + return s.dataset.goatcounter + return (goatcounter.endpoint || window.counter) // counter is for compat; don't use. + } + + // Get current path. + var get_path = function() { + var loc = location, + c = document.querySelector('link[rel="canonical"][href]') + if (c) { // May be relative or point to different domain. + var a = document.createElement('a') + a.href = c.href + if (a.hostname.replace(/^www\./, '') === location.hostname.replace(/^www\./, '')) + loc = a + } + return (loc.pathname + loc.search) || '/' + } + + // Run function after DOM is loaded. + var on_load = function(f) { + if (document.body === null) + document.addEventListener('DOMContentLoaded', function() { f() }, false) + else + f() + } + + // Filter some requests that we (probably) don't want to count. + goatcounter.filter = function() { + if ('visibilityState' in document && document.visibilityState === 'prerender') + return 'visibilityState' + if (!goatcounter.allow_frame && location !== parent.location) + return 'frame' + if (!goatcounter.allow_local && location.hostname.match(/(localhost$|^127\.|^10\.|^172\.(1[6-9]|2[0-9]|3[0-1])\.|^192\.168\.|^0\.0\.0\.0$)/)) + return 'localhost' + if (!goatcounter.allow_local && location.protocol === 'file:') + return 'localfile' + if (localStorage && localStorage.getItem('skipgc') === 't') + return 'disabled with #toggle-goatcounter' + return false + } + + // Get URL to send to GoatCounter. + window.goatcounter.url = function(vars) { + var data = get_data(vars || {}) + if (data.p === null) // null from user callback. + return + data.rnd = Math.random().toString(36).substr(2, 5) // Browsers don't always listen to Cache-Control. + + var endpoint = get_endpoint() + if (!endpoint) + return warn('no endpoint found') + + return endpoint + urlencode(data) + } + + // Count a hit. + window.goatcounter.count = function(vars) { + var f = goatcounter.filter() + if (f) + return warn('not counting because of: ' + f) + + var url = goatcounter.url(vars) + if (!url) + return warn('not counting because path callback returned null') + + var img = document.createElement('img') + img.src = url + img.style.position = 'absolute' // Affect layout less. + img.style.bottom = '0px' + img.style.width = '1px' + img.style.height = '1px' + img.loading = 'eager' + img.setAttribute('alt', '') + img.setAttribute('aria-hidden', 'true') + + var rm = function() { if (img && img.parentNode) img.parentNode.removeChild(img) } + img.addEventListener('load', rm, false) + document.body.appendChild(img) + } + + // Get a query parameter. + window.goatcounter.get_query = function(name) { + var s = location.search.substr(1).split('&') + for (var i = 0; i < s.length; i++) + if (s[i].toLowerCase().indexOf(name.toLowerCase() + '=') === 0) + return s[i].substr(name.length + 1) + } + + // Track click events. + window.goatcounter.bind_events = function() { + if (!document.querySelectorAll) // Just in case someone uses an ancient browser. + return + + var send = function(elem) { + return function() { + goatcounter.count({ + event: true, + path: (elem.dataset.goatcounterClick || elem.name || elem.id || ''), + title: (elem.dataset.goatcounterTitle || elem.title || (elem.innerHTML || '').substr(0, 200) || ''), + referrer: (elem.dataset.goatcounterReferrer || elem.dataset.goatcounterReferral || ''), + }) + } + } + + Array.prototype.slice.call(document.querySelectorAll("*[data-goatcounter-click]")).forEach(function(elem) { + if (elem.dataset.goatcounterBound) + return + var f = send(elem) + elem.addEventListener('click', f, false) + elem.addEventListener('auxclick', f, false) // Middle click. + elem.dataset.goatcounterBound = 'true' + }) + } + + // Add a "visitor counter" frame or image. + window.goatcounter.visit_count = function(opt) { + on_load(function() { + opt = opt || {} + opt.type = opt.type || 'html' + opt.append = opt.append || 'body' + opt.path = opt.path || get_path() + opt.attr = opt.attr || {width: '200', height: (opt.no_branding ? '60' : '80')} + + opt.attr['src'] = get_endpoint() + 'er/' + enc(opt.path) + '.' + enc(opt.type) + '?' + if (opt.no_branding) opt.attr['src'] += '&no_branding=1' + if (opt.style) opt.attr['src'] += '&style=' + enc(opt.style) + if (opt.start) opt.attr['src'] += '&start=' + enc(opt.start) + if (opt.end) opt.attr['src'] += '&end=' + enc(opt.end) + + var tag = {png: 'img', svg: 'img', html: 'iframe'}[opt.type] + if (!tag) + return warn('visit_count: unknown type: ' + opt.type) + + if (opt.type === 'html') { + opt.attr['frameborder'] = '0' + opt.attr['scrolling'] = 'no' + } + + var d = document.createElement(tag) + for (var k in opt.attr) + d.setAttribute(k, opt.attr[k]) + + var p = document.querySelector(opt.append) + if (!p) + return warn('visit_count: append not found: ' + opt.append) + p.appendChild(d) + }) + } + + // Make it easy to skip your own views. + if (location.hash === '#toggle-goatcounter') { + if (localStorage.getItem('skipgc') === 't') { + localStorage.removeItem('skipgc', 't') + alert('GoatCounter tracking is now ENABLED in this browser.') + } + else { + localStorage.setItem('skipgc', 't') + alert('GoatCounter tracking is now DISABLED in this browser until ' + location + ' is loaded again.') + } + } + + if (!goatcounter.no_onload) + on_load(function() { + // 1. Page is visible, count request. + // 2. Page is not yet visible; wait until it switches to 'visible' and count. + // See #487 + if (!('visibilityState' in document) || document.visibilityState === 'visible') + goatcounter.count() + else { + var f = function(e) { + if (document.visibilityState !== 'visible') + return + document.removeEventListener('visibilitychange', f) + goatcounter.count() + } + document.addEventListener('visibilitychange', f) + } + + if (!goatcounter.no_events) + goatcounter.bind_events() + }) +})(); + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \normalcommits + \indexnode[2,-3] + \worknode[-2,-3] + \commit 2eecb (2) -> B; + \commit 33104 (3) -> 2; + \branch other -> 3; + + % draw the old branch manually with a long line + \node [old branch, above=1 of E] (old main) {main}; + \path [old branch line] (old main) edge (E); + \node [cancel ref, above=.2\g of E, anchor=center] {}; + \oldHEAD -> old main; + + \newcommit f8bc5 (F) -> E; + \branch main -> F; + \HEAD -> main; + \path [background line, bend right=15] (F) edge[-] (3); + \path [commit line, bend right=15] (F) edge (3); + + \node [cmd] at (0, 3.75) {git merge other}; + + \node [inner sep=8\gLine] (merge) at (0,-1) {3-way merge}; + + \path [background line] + (3) edge [-, bend right=15] (merge) + ; + \path [line] + (3) edge [bend right=15] (merge) + (B) edge [bend right=37] (merge) + (E) edge [bend left=20] (merge) + (merge) edge [bend right=10] (index) + (merge) edge [bend left=10] (work) + (index) edge [bend right=35] node [near start] {(if no conflicts)} (F) + (old HEAD label) edge [dashed, bend left=35] (HEAD) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \refbelow [branch] "main" : main -> E; + \oldbranch stable -> A; + \branch stable -> E; + \oldHEAD -> old stable; + \HEAD -> stable; + + \node [cmd] at (0, 3.75) {git merge main}; + + \path [line] + (E) edge [bend right=5] (index.north east) + (E) edge [bend right=15] (work.north east) + (old HEAD) edge [dashed, bend left=10] (HEAD) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \indexnode + \worknode + \commitTerminal cT at (-6,.75); + \commit a47c3 (A) -> cT; + \commit b325c (B) -> A; + \commit c10b9 (C) -> B; + \commit da985 (D) -> C; + \newcommit e57cf (E) -> D; + \newcommit f7e63 (F) -> E; + \commit 169a6 (1) -> A; + \commit 2c33a (2) -> 1; + + \oldbranch topic -> 2; + \oldHEAD -> old topic; + \branch main -> D; + \branch topic -> F; + \HEAD -> topic; + + \node [cmd,right] at (1, 3.75) {git rebase main}; + + \path [line] + (F) edge [bend left=20] (index) + (F) edge [bend left=30] (work) + (old HEAD label) edge [dashed, bend left=10] (HEAD label) + (1) edge [loosely dashed, bend right=35] (E) + (2) edge [loosely dashed, bend left=30] (F) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \indexnode + \worknode + \commitTerminal cT at (-6,.75); + \commit a47c3 (A) -> cT; + \commit b325c (B) -> A; + \commit c10b9 (C) -> B; + \commit da985 (D) -> C; + \newcommit e918c (E) -> D; + \commit 169a6 (1) -> A; + \commit 2c33a (2) -> 1; + + \oldbranch topic -> 2; + \oldHEAD -> old topic; + \branch main -> D; + \branch topic -> E; + \HEAD -> topic; + + \node [cmd,right] at (1, 3.75) {git rebase --onto main 169a6}; + + \path [line] + (E) edge [bend left=20] (index) + (E) edge [bend left=30] (work) + (old HEAD label) edge [dashed, bend left=10] (HEAD label) + (2) edge [loosely dashed, bend right=40] (E) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch main -> E; + \branch stable -> A; + \HEAD -> main; + + \node [cmd] (cmd1) at (0, 3.75) {git reset}; + + \path [line, auto=left] + (E) edge [bend left=20] (index) + (E) edge [bend left=30] node {(if \texttt{--hard})} (work) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch stable -> A; + \oldbranch main -> E; + \branch main -> B; + \oldHEAD -> old main; + \HEAD -> main; + + \node [cmd] at (0, 3.75) {git reset HEAD\~{}3}; + + \path [line, auto=left] + (B) edge [bend right=20] node [near end] + {(if not \texttt{--soft})} (index) + (B) edge [bend right=40] node [swap] {(if \texttt{--hard})} (work) + (old HEAD) edge [dashed, bend right=15] (HEAD) + ; + +\end{tikzpicture} +\end{document} + +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch main -> E; + \branch stable -> A; + \HEAD -> main; + + \node [cmd] (cmd1) at (0, 3.75) {git reset -- \emph{files}}; + + \path [line] + (E) edge [bend left=20] (index) + ; + +\end{tikzpicture} +\end{document} + +html{ + background: #FAFAFA; +} + +body{ + font-family: sans-serif; + margin: 0 auto; + width: 70%; + padding: 20px 0px; + background: white; + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25); + color: rgba(0,0,0,0.7); +} + +@media handheld, screen and (max-width: 995px){ + body{ + width: 100%; + } +} + +h1, h2, h3{ + color: rgba(0,0,0,0.8); + margin-left: 20px; + margin-right: 20px; +} + +h1{font-size: 4rem;} +h2{font-size: 2rem;} +h3{font-size: 1.2rem;} + +a, a:visited{ + text-decoration: none; + color: #f05033; + font-size: 1rem; +} + + +p, div, ol, ul, pre, strong{ + margin-left: 20px; + margin-right: 20px; +} + +hr{ + color: #212121; + height: 1px; + background: #BDBDBD; +} + + +.center { + text-align: center; +} +#link-to-png, #link-to-svg { + font-style: italic; display: none; +} +ol ol { + list-style-type: lower-alpha; +} +#language-box { + position: absolute; + top: 2px; + font-family: sans-serif; + list-style: none; + margin: 0; + padding: 0; + text-align: center; +} +#language-box ul { + display: inline; + list-style: none; + margin: 0 0 0 -0.5em; + padding: 0.5em; + width: 100%; +} +#language-box ul li { + padding: .2ex 0; + display: inline; +} +#language-box ul li.selected { + display: none; +} +@media print { + #language-box { + display: none; + } + body{ + width: 100%; + } +} +pre { + margin-left: 2em; +} + +// Webkit browsers can't zoom properly with object tags. +if (navigator.userAgent.indexOf("AppleWebKit") > -1) { + replacePNG = function(img, src) { + var h = img.height, w = img.width; + img.src = src; + img.height = h; + img.width = w; + return 0; + } +} else { + replacePNG = function(img, src) { + var p = img.parentNode; + var obj = document.createElement('object'); + obj.type = 'image/svg+xml'; + obj.data = src; + obj.width = img.width; + obj.height = img.height; + p.appendChild(obj); + p.removeChild(img); + return -1; + } +} +var svg_disabled = window.location.search.indexOf("no-svg") > 0; +// Replace all the PNGs with SVGs on browsers that support them. +function replace_all_PNGs() { + var hasSVG = document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"); + if (hasSVG) { + if (svg_disabled) { + document.getElementById('link-to-svg').style.display = 'block'; + return; + } + var images = document.getElementsByTagName('img'); + for (var i = 0; i < images.length; i++) { + var img = images[i]; + var src = img.src.match(/^(.*\.svg)\.png$/) + if (src) + i += replacePNG(img, src[1]); + } + document.getElementById('link-to-png').style.display = 'block'; + } +} + +// enable Google Analytics +var _gaq = _gaq || []; +_gaq.push(['_setAccount', 'UA-13167645-1']); +_gaq.push(['_trackPageview']); +(function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); +})(); + edge [->] (stable) + (-5,-0.5) node {files to go in next commit} edge [->] (index) + (-5,-2) node {files that you ``see''} edge [->] (work) + (5,-1) node [text width=6\g, text badly centered] + {commit objects, identified by SHA-1 hash} + edge [->] (E) + edge [->] (D) + edge [->] (C) + + (-1,2.25) node {child points to parent} edge [->] ($ (B)!.5!(C) $) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/goatcounter.js b/ta/goatcounter.js new file mode 100644 index 0000000..e7911ec --- /dev/null +++ b/ta/goatcounter.js @@ -0,0 +1,269 @@ +// GoatCounter: https://www.goatcounter.com +// This file (and *only* this file) is released under the ISC license: +// https://opensource.org/licenses/ISC +;(function() { + 'use strict'; + + if (window.goatcounter && window.goatcounter.vars) // Compatibility with very old version; do not use. + window.goatcounter = window.goatcounter.vars + else + window.goatcounter = window.goatcounter || {} + + // Load settings from data-goatcounter-settings. + var s = document.querySelector('script[data-goatcounter]') + if (s && s.dataset.goatcounterSettings) { + try { var set = JSON.parse(s.dataset.goatcounterSettings) } + catch (err) { console.error('invalid JSON in data-goatcounter-settings: ' + err) } + for (var k in set) + if (['no_onload', 'no_events', 'allow_local', 'allow_frame', 'path', 'title', 'referrer', 'event'].indexOf(k) > -1) + window.goatcounter[k] = set[k] + } + + var enc = encodeURIComponent + + // Get all data we're going to send off to the counter endpoint. + var get_data = function(vars) { + var data = { + p: (vars.path === undefined ? goatcounter.path : vars.path), + r: (vars.referrer === undefined ? goatcounter.referrer : vars.referrer), + t: (vars.title === undefined ? goatcounter.title : vars.title), + e: !!(vars.event || goatcounter.event), + s: [window.screen.width, window.screen.height, (window.devicePixelRatio || 1)], + b: is_bot(), + q: location.search, + } + + var rcb, pcb, tcb // Save callbacks to apply later. + if (typeof(data.r) === 'function') rcb = data.r + if (typeof(data.t) === 'function') tcb = data.t + if (typeof(data.p) === 'function') pcb = data.p + + if (is_empty(data.r)) data.r = document.referrer + if (is_empty(data.t)) data.t = document.title + if (is_empty(data.p)) data.p = get_path() + + if (rcb) data.r = rcb(data.r) + if (tcb) data.t = tcb(data.t) + if (pcb) data.p = pcb(data.p) + return data + } + + // Check if a value is "empty" for the purpose of get_data(). + var is_empty = function(v) { return v === null || v === undefined || typeof(v) === 'function' } + + // See if this looks like a bot; there is some additional filtering on the + // backend, but these properties can't be fetched from there. + var is_bot = function() { + // Headless browsers are probably a bot. + var w = window, d = document + if (w.callPhantom || w._phantom || w.phantom) + return 150 + if (w.__nightmare) + return 151 + if (d.__selenium_unwrapped || d.__webdriver_evaluate || d.__driver_evaluate) + return 152 + if (navigator.webdriver) + return 153 + return 0 + } + + // Object to urlencoded string, starting with a ?. + var urlencode = function(obj) { + var p = [] + for (var k in obj) + if (obj[k] !== '' && obj[k] !== null && obj[k] !== undefined && obj[k] !== false) + p.push(enc(k) + '=' + enc(obj[k])) + return '?' + p.join('&') + } + + // Show a warning in the console. + var warn = function(msg) { + if (console && 'warn' in console) + console.warn('goatcounter: ' + msg) + } + + // Get the endpoint to send requests to. + var get_endpoint = function() { + var s = document.querySelector('script[data-goatcounter]') + if (s && s.dataset.goatcounter) + return s.dataset.goatcounter + return (goatcounter.endpoint || window.counter) // counter is for compat; don't use. + } + + // Get current path. + var get_path = function() { + var loc = location, + c = document.querySelector('link[rel="canonical"][href]') + if (c) { // May be relative or point to different domain. + var a = document.createElement('a') + a.href = c.href + if (a.hostname.replace(/^www\./, '') === location.hostname.replace(/^www\./, '')) + loc = a + } + return (loc.pathname + loc.search) || '/' + } + + // Run function after DOM is loaded. + var on_load = function(f) { + if (document.body === null) + document.addEventListener('DOMContentLoaded', function() { f() }, false) + else + f() + } + + // Filter some requests that we (probably) don't want to count. + goatcounter.filter = function() { + if ('visibilityState' in document && document.visibilityState === 'prerender') + return 'visibilityState' + if (!goatcounter.allow_frame && location !== parent.location) + return 'frame' + if (!goatcounter.allow_local && location.hostname.match(/(localhost$|^127\.|^10\.|^172\.(1[6-9]|2[0-9]|3[0-1])\.|^192\.168\.|^0\.0\.0\.0$)/)) + return 'localhost' + if (!goatcounter.allow_local && location.protocol === 'file:') + return 'localfile' + if (localStorage && localStorage.getItem('skipgc') === 't') + return 'disabled with #toggle-goatcounter' + return false + } + + // Get URL to send to GoatCounter. + window.goatcounter.url = function(vars) { + var data = get_data(vars || {}) + if (data.p === null) // null from user callback. + return + data.rnd = Math.random().toString(36).substr(2, 5) // Browsers don't always listen to Cache-Control. + + var endpoint = get_endpoint() + if (!endpoint) + return warn('no endpoint found') + + return endpoint + urlencode(data) + } + + // Count a hit. + window.goatcounter.count = function(vars) { + var f = goatcounter.filter() + if (f) + return warn('not counting because of: ' + f) + + var url = goatcounter.url(vars) + if (!url) + return warn('not counting because path callback returned null') + + var img = document.createElement('img') + img.src = url + img.style.position = 'absolute' // Affect layout less. + img.style.bottom = '0px' + img.style.width = '1px' + img.style.height = '1px' + img.loading = 'eager' + img.setAttribute('alt', '') + img.setAttribute('aria-hidden', 'true') + + var rm = function() { if (img && img.parentNode) img.parentNode.removeChild(img) } + img.addEventListener('load', rm, false) + document.body.appendChild(img) + } + + // Get a query parameter. + window.goatcounter.get_query = function(name) { + var s = location.search.substr(1).split('&') + for (var i = 0; i < s.length; i++) + if (s[i].toLowerCase().indexOf(name.toLowerCase() + '=') === 0) + return s[i].substr(name.length + 1) + } + + // Track click events. + window.goatcounter.bind_events = function() { + if (!document.querySelectorAll) // Just in case someone uses an ancient browser. + return + + var send = function(elem) { + return function() { + goatcounter.count({ + event: true, + path: (elem.dataset.goatcounterClick || elem.name || elem.id || ''), + title: (elem.dataset.goatcounterTitle || elem.title || (elem.innerHTML || '').substr(0, 200) || ''), + referrer: (elem.dataset.goatcounterReferrer || elem.dataset.goatcounterReferral || ''), + }) + } + } + + Array.prototype.slice.call(document.querySelectorAll("*[data-goatcounter-click]")).forEach(function(elem) { + if (elem.dataset.goatcounterBound) + return + var f = send(elem) + elem.addEventListener('click', f, false) + elem.addEventListener('auxclick', f, false) // Middle click. + elem.dataset.goatcounterBound = 'true' + }) + } + + // Add a "visitor counter" frame or image. + window.goatcounter.visit_count = function(opt) { + on_load(function() { + opt = opt || {} + opt.type = opt.type || 'html' + opt.append = opt.append || 'body' + opt.path = opt.path || get_path() + opt.attr = opt.attr || {width: '200', height: (opt.no_branding ? '60' : '80')} + + opt.attr['src'] = get_endpoint() + 'er/' + enc(opt.path) + '.' + enc(opt.type) + '?' + if (opt.no_branding) opt.attr['src'] += '&no_branding=1' + if (opt.style) opt.attr['src'] += '&style=' + enc(opt.style) + if (opt.start) opt.attr['src'] += '&start=' + enc(opt.start) + if (opt.end) opt.attr['src'] += '&end=' + enc(opt.end) + + var tag = {png: 'img', svg: 'img', html: 'iframe'}[opt.type] + if (!tag) + return warn('visit_count: unknown type: ' + opt.type) + + if (opt.type === 'html') { + opt.attr['frameborder'] = '0' + opt.attr['scrolling'] = 'no' + } + + var d = document.createElement(tag) + for (var k in opt.attr) + d.setAttribute(k, opt.attr[k]) + + var p = document.querySelector(opt.append) + if (!p) + return warn('visit_count: append not found: ' + opt.append) + p.appendChild(d) + }) + } + + // Make it easy to skip your own views. + if (location.hash === '#toggle-goatcounter') { + if (localStorage.getItem('skipgc') === 't') { + localStorage.removeItem('skipgc', 't') + alert('GoatCounter tracking is now ENABLED in this browser.') + } + else { + localStorage.setItem('skipgc', 't') + alert('GoatCounter tracking is now DISABLED in this browser until ' + location + ' is loaded again.') + } + } + + if (!goatcounter.no_onload) + on_load(function() { + // 1. Page is visible, count request. + // 2. Page is not yet visible; wait until it switches to 'visible' and count. + // See #487 + if (!('visibilityState' in document) || document.visibilityState === 'visible') + goatcounter.count() + else { + var f = function(e) { + if (document.visibilityState !== 'visible') + return + document.removeEventListener('visibilitychange', f) + goatcounter.count() + } + document.addEventListener('visibilitychange', f) + } + + if (!goatcounter.no_events) + goatcounter.bind_events() + }) +})(); diff --git a/ta/merge-ff.tex b/ta/merge-ff.tex new file mode 100644 index 0000000..6f99bfc --- /dev/null +++ b/ta/merge-ff.tex @@ -0,0 +1,21 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \refbelow [branch] "main" : main -> E; + \oldbranch stable -> A; + \branch stable -> E; + \oldHEAD -> old stable; + \HEAD -> stable; + + \node [cmd] at (0, 3.75) {git merge main}; + + \path [line] + (E) edge [bend right=5] (index.north east) + (E) edge [bend right=15] (work.north east) + (old HEAD) edge [dashed, bend left=10] (HEAD) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/merge.tex b/ta/merge.tex new file mode 100644 index 0000000..35e209a --- /dev/null +++ b/ta/merge.tex @@ -0,0 +1,42 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \normalcommits + \indexnode[2,-3] + \worknode[-2,-3] + \commit 2eecb (2) -> B; + \commit 33104 (3) -> 2; + \branch other -> 3; + + % draw the old branch manually with a long line + \node [old branch, above=1 of E] (old main) {main}; + \path [old branch line] (old main) edge (E); + \node [cancel ref, above=.2\g of E, anchor=center] {}; + \oldHEAD -> old main; + + \newcommit f8bc5 (F) -> E; + \branch main -> F; + \HEAD -> main; + \path [background line, bend right=15] (F) edge[-] (3); + \path [commit line, bend right=15] (F) edge (3); + + \node [cmd] at (0, 3.75) {git merge other}; + + \node [inner sep=8\gLine] (merge) at (0,-1) {3-way merge}; + + \path [background line] + (3) edge [-, bend right=15] (merge) + ; + \path [line] + (3) edge [bend right=15] (merge) + (B) edge [bend right=37] (merge) + (E) edge [bend left=20] (merge) + (merge) edge [bend right=10] (index) + (merge) edge [bend left=10] (work) + (index) edge [bend right=35] node [near start] {(if no conflicts)} (F) + (old HEAD label) edge [dashed, bend left=35] (HEAD) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/rebase-onto.tex b/ta/rebase-onto.tex new file mode 100644 index 0000000..85e5b9f --- /dev/null +++ b/ta/rebase-onto.tex @@ -0,0 +1,32 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \indexnode + \worknode + \commitTerminal cT at (-6,.75); + \commit a47c3 (A) -> cT; + \commit b325c (B) -> A; + \commit c10b9 (C) -> B; + \commit da985 (D) -> C; + \newcommit e918c (E) -> D; + \commit 169a6 (1) -> A; + \commit 2c33a (2) -> 1; + + \oldbranch topic -> 2; + \oldHEAD -> old topic; + \branch main -> D; + \branch topic -> E; + \HEAD -> topic; + + \node [cmd,right] at (1, 3.75) {git rebase --onto main 169a6}; + + \path [line] + (E) edge [bend left=20] (index) + (E) edge [bend left=30] (work) + (old HEAD label) edge [dashed, bend left=10] (HEAD label) + (2) edge [loosely dashed, bend right=40] (E) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/rebase.tex b/ta/rebase.tex new file mode 100644 index 0000000..266e43d --- /dev/null +++ b/ta/rebase.tex @@ -0,0 +1,34 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \indexnode + \worknode + \commitTerminal cT at (-6,.75); + \commit a47c3 (A) -> cT; + \commit b325c (B) -> A; + \commit c10b9 (C) -> B; + \commit da985 (D) -> C; + \newcommit e57cf (E) -> D; + \newcommit f7e63 (F) -> E; + \commit 169a6 (1) -> A; + \commit 2c33a (2) -> 1; + + \oldbranch topic -> 2; + \oldHEAD -> old topic; + \branch main -> D; + \branch topic -> F; + \HEAD -> topic; + + \node [cmd,right] at (1, 3.75) {git rebase main}; + + \path [line] + (F) edge [bend left=20] (index) + (F) edge [bend left=30] (work) + (old HEAD label) edge [dashed, bend left=10] (HEAD label) + (1) edge [loosely dashed, bend right=35] (E) + (2) edge [loosely dashed, bend left=30] (F) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/reset-commit.tex b/ta/reset-commit.tex new file mode 100644 index 0000000..d6aac25 --- /dev/null +++ b/ta/reset-commit.tex @@ -0,0 +1,22 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch stable -> A; + \oldbranch main -> E; + \branch main -> B; + \oldHEAD -> old main; + \HEAD -> main; + + \node [cmd] at (0, 3.75) {git reset HEAD\~{}3}; + + \path [line, auto=left] + (B) edge [bend right=20] node [near end] + {(if not \texttt{--soft})} (index) + (B) edge [bend right=40] node [swap] {(if \texttt{--hard})} (work) + (old HEAD) edge [dashed, bend right=15] (HEAD) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/reset-files.tex b/ta/reset-files.tex new file mode 100644 index 0000000..2f0dfc7 --- /dev/null +++ b/ta/reset-files.tex @@ -0,0 +1,17 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch main -> E; + \branch stable -> A; + \HEAD -> main; + + \node [cmd] (cmd1) at (0, 3.75) {git reset -- \emph{கோப்புகள்}}; + + \path [line] + (E) edge [bend left=20] (index) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/reset.tex b/ta/reset.tex new file mode 100644 index 0000000..8b8ccf4 --- /dev/null +++ b/ta/reset.tex @@ -0,0 +1,18 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \usualsetup + \branch main -> E; + \branch stable -> A; + \HEAD -> main; + + \node [cmd] (cmd1) at (0, 3.75) {git reset}; + + \path [line, auto=left] + (E) edge [bend left=20] (index) + (E) edge [bend left=30] node {(if \texttt{--hard})} (work) + ; + +\end{tikzpicture} +\end{document} diff --git a/ta/visual-git-guide.css b/ta/visual-git-guide.css new file mode 100644 index 0000000..808d50f --- /dev/null +++ b/ta/visual-git-guide.css @@ -0,0 +1,92 @@ +html{ + background: #FAFAFA; +} + +body{ + font-family: sans-serif; + margin: 0 auto; + width: 70%; + padding: 20px 0px; + background: white; + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25); + color: rgba(0,0,0,0.7); +} + +@media handheld, screen and (max-width: 995px){ + body{ + width: 100%; + } +} + +h1, h2, h3{ + color: rgba(0,0,0,0.8); + margin-left: 20px; + margin-right: 20px; +} + +h1{font-size: 4rem;} +h2{font-size: 2rem;} +h3{font-size: 1.2rem;} + +a, a:visited{ + text-decoration: none; + color: #f05033; + font-size: 1rem; +} + + +p, div, ol, ul, pre, strong{ + margin-left: 20px; + margin-right: 20px; +} + +hr{ + color: #212121; + height: 1px; + background: #BDBDBD; +} + + +.center { + text-align: center; +} +#link-to-png, #link-to-svg { + font-style: italic; display: none; +} +ol ol { + list-style-type: lower-alpha; +} +#language-box { + position: absolute; + top: 2px; + font-family: sans-serif; + list-style: none; + margin: 0; + padding: 0; + text-align: center; +} +#language-box ul { + display: inline; + list-style: none; + margin: 0 0 0 -0.5em; + padding: 0.5em; + width: 100%; +} +#language-box ul li { + padding: .2ex 0; + display: inline; +} +#language-box ul li.selected { + display: none; +} +@media print { + #language-box { + display: none; + } + body{ + width: 100%; + } +} +pre { + margin-left: 2em; +} diff --git a/ta/visual-git-guide.js b/ta/visual-git-guide.js new file mode 100644 index 0000000..13e856d --- /dev/null +++ b/ta/visual-git-guide.js @@ -0,0 +1,51 @@ +// Webkit browsers can't zoom properly with object tags. +if (navigator.userAgent.indexOf("AppleWebKit") > -1) { + replacePNG = function(img, src) { + var h = img.height, w = img.width; + img.src = src; + img.height = h; + img.width = w; + return 0; + } +} else { + replacePNG = function(img, src) { + var p = img.parentNode; + var obj = document.createElement('object'); + obj.type = 'image/svg+xml'; + obj.data = src; + obj.width = img.width; + obj.height = img.height; + p.appendChild(obj); + p.removeChild(img); + return -1; + } +} +var svg_disabled = window.location.search.indexOf("no-svg") > 0; +// Replace all the PNGs with SVGs on browsers that support them. +function replace_all_PNGs() { + var hasSVG = document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"); + if (hasSVG) { + if (svg_disabled) { + document.getElementById('link-to-svg').style.display = 'block'; + return; + } + var images = document.getElementsByTagName('img'); + for (var i = 0; i < images.length; i++) { + var img = images[i]; + var src = img.src.match(/^(.*\.svg)\.png$/) + if (src) + i += replacePNG(img, src[1]); + } + document.getElementById('link-to-png').style.display = 'block'; + } +} + +// enable Google Analytics +var _gaq = _gaq || []; +_gaq.push(['_setAccount', 'UA-13167645-1']); +_gaq.push(['_trackPageview']); +(function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); +})(); diff --git "a/ta/\340\256\205\340\256\237\340\256\277\340\256\252\340\257\215\340\256\252\340\256\237\340\257\210-\340\256\252\340\256\257\340\256\251\340\257\215\340\256\252\340\256\276\340\256\237\340\257\201-2.tex" "b/ta/\340\256\205\340\256\237\340\256\277\340\256\252\340\257\215\340\256\252\340\256\237\340\257\210-\340\256\252\340\256\257\340\256\251\340\257\215\340\256\252\340\256\276\340\256\237\340\257\201-2.tex" new file mode 100644 index 0000000..409e45d --- /dev/null +++ "b/ta/\340\256\205\340\256\237\340\256\277\340\256\252\340\257\215\340\256\252\340\256\237\340\257\210-\340\256\252\340\256\257\340\256\251\340\257\215\340\256\252\340\256\276\340\256\237\340\257\201-2.tex" @@ -0,0 +1,25 @@ +\input{common.tex} +\geometry{papersize={25\g,9\g}} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \historynode[0,2] + \indexnode[0,0] + \worknode[0,-2] + + \path [line] + (work.north east) + edge node[cmd] {} + (index.south east) + (work.north east) + edge node[cmd] {git commit (\emph{files}|-a)} + (head.south east) + (head.south west) + edge node[cmd] {git checkout HEAD -- \emph{files}} + (work.north west) + (head.south west) + edge + (index.north west) + ; +\end{tikzpicture} +\end{document} diff --git "a/ta/\340\256\205\340\256\237\340\256\277\340\256\252\340\257\215\340\256\252\340\256\237\340\257\210-\340\256\252\340\256\257\340\256\251\340\257\215\340\256\252\340\256\276\340\256\237\340\257\201.tex" "b/ta/\340\256\205\340\256\237\340\256\277\340\256\252\340\257\215\340\256\252\340\256\237\340\257\210-\340\256\252\340\256\257\340\256\251\340\257\215\340\256\252\340\256\276\340\256\237\340\257\201.tex" new file mode 100644 index 0000000..be9db91 --- /dev/null +++ "b/ta/\340\256\205\340\256\237\340\256\277\340\256\252\340\257\215\340\256\252\340\256\237\340\257\210-\340\256\252\340\256\257\340\256\251\340\257\215\340\256\252\340\256\276\340\256\237\340\257\201.tex" @@ -0,0 +1,25 @@ +\input{common.tex} +\geometry{papersize={21\g,9\g}} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \வரலாறுமுனை[0,2] + \மேடைமுனை[0,0] + \பணிமுனை[0,-2] + + \path [line] + (பணி.north east) + edge node[cmd] {git add \emph{கோப்புகள்}} + (மேடை.south east) + (மேடை.north east) + edge node[cmd] {git commit} + (தலை.south east) + (மேடை.south west) + edge node[cmd] {git checkout -- \emph{கோப்புகள்}} + (பணி.north west) + (தலை.south west) + edge node[cmd] {git reset -- \emph{கோப்புகள்}} + (மேடை.north west) + ; +\end{tikzpicture} +\end{document} diff --git "a/ta/\340\256\252\340\257\212\340\256\244\340\257\201.tex" "b/ta/\340\256\252\340\257\212\340\256\244\340\257\201.tex" new file mode 100644 index 0000000..ebb3f82 --- /dev/null +++ "b/ta/\340\256\252\340\257\212\340\256\244\340\257\201.tex" @@ -0,0 +1,155 @@ +\documentclass[12pt]{article} +\usepackage[latin1]{inputenc} +\usepackage{cmbright} +\usepackage[pdftex,margin=0pt,noheadfoot]{geometry} +\usepackage{tikz} +\usetikzlibrary{shapes,arrows,shadows,positioning,calc} + +\colorlet{HEAD}{gray!50} +\colorlet{branch}{orange!50} +\colorlet{commit}{green!50} +\colorlet{index}{blue!40} +\colorlet{work}{red!40} +\colorlet{old HEAD}{HEAD!50} +\colorlet{old branch}{branch!50} + +% Global Scaling Factors +% Values that seem reasonable: +% 1cm / 1pt / \Large +% .5cm / .5pt / \scriptsize +\newlength\g +\setlength\g{1cm} +\newlength\gLine +\setlength\gLine{1pt} +\newcommand\gFont{\Large} + +\geometry{papersize={24\g,14\g}} + +\tikzset{ +index/.style={rectangle, text width=5\g, text centered, rounded corners, + minimum height=1.5\g, line width=3\gLine, fill=#1!50, draw=#1}, +index/.default={index}, +history/.style={index=commit, fill=commit!40}, +work/.style={index=work}, +% +object/.style={rectangle, text width=2\g, text centered, rounded corners, + minimum height=1\g, line width=3\gLine, fill=#1!50, draw=#1}, +object/.default={red}, +commit/.style={object=commit, fill=commit!40}, +new commit/.style={commit, double shadow}, +branch/.style={object=branch}, +HEAD/.style={object=HEAD}, +old branch/.style={object=old branch, text=black!30}, +old HEAD/.style={object=old HEAD, text=black!30}, +attached HEAD/.style={HEAD, minimum height=2\g}, +attached HEAD label/.style={object, draw=none, fill=none}, +old attached HEAD/.style={old HEAD, minimum height=2\g}, +old attached HEAD label/.style={attached HEAD label, text=black!30}, +% +double shadow/.style={ + preaction={fill=#1,transform canvas={xshift=.2\g,yshift=-.2\g}}, + preaction={fill=#1,transform canvas={xshift=-.2\g,yshift=.2\g}}, + }, +double shadow/.default={yellow!75}, +% +line/.style={>=stealth', line width=1.5\gLine, draw=black!70, auto=right, + bend right}, +object line/.style={>=stealth, line width=1.5\gLine}, +commit line/.style={object line, color=commit}, +new commit line/.style={commit line}, +HEAD line/.style={object line, color=HEAD}, +branch line/.style={object line, color=branch}, +old HEAD line/.style={object line, color=old HEAD}, +old branch line/.style={object line, color=old branch}, +cancel ref/.style={cross out, draw=black!70, line width=1\gLine}, +% +background line/.style={draw=white, line width=6\gLine, + shorten >=6\gLine, shorten <=6\gLine}, +% +cmd/.style={color=black, font={\gFont\ttfamily}}, +% +main/.style={node distance=.7\g, bend angle=35, font={\gFont}, + x=1.5\g, y=1.5\g}, +every edge/.style={draw, ->}, +} + +\pgfdeclarelayer{HEAD} +\pgfsetlayers{HEAD,main} + +\newcommand\boundingbox{\clip (-.5\textwidth,-.5\textheight) rectangle + (.5\textwidth,.5\textheight);} + +\newcommand\historynode[1][0,.5]{\node [history] (head) at (#1) {History};} +\newcommand\indexnode[1][0,-1]{\node [index] (index) at (#1) {Stage (Index)};} +\newcommand\worknode[1][0,-2.5]{\node [work] (work) at (#1) {Working Directory};} +\newcommand\normalcommits[1][-6,.75]{ + \commitTerminal cT at (#1); + \commit a47c3 (A) -> cT; + \commit b325c (B) -> A; + \commit c10b9 (C) -> B; + \commit da985 (D) -> C; + \commit ed489 (E) -> D; +} +\newcommand\usualsetup{ + \normalcommits + \indexnode + \worknode +} + +\def\ref [#1] "#2" : #3 -> #4;{ + \node [#1, above=.4\g of #4] (#3) {#2}; + \path [#1 line] (#3) edge (#4); + } +\def\oldref [#1] "#2" : #3 -> #4;{ + \ref [old #1] "#2" : old #3 -> #4; + \node [cancel ref, above=.2\g of #4, anchor=center] {}; + } +\def\refbelow [#1] "#2" : #3 -> #4;{ + \node [#1, below=.4\g of #4] (#3) {#2}; + \path [#1 line] (#3) edge (#4); + } + +\newcounter{tmp} +\def\commitTerminal #1 at (#2);{ + \node (#1) at (#2) {\LARGE$\cdots$}; + \pgfkeys{/child count/#1/.initial=0} +} +\def\commitcommon [#1] #2 (#3) -> [#4] #5;{ + \setcounter{tmp}{\pgfkeysvalueof{/child count/#5}} + \node [#1, anchor=west] (#3) at ($ (#5.east) + (.5,\value{tmp}) $) {#2}; + \draw [#4] (#3) edge (#5); + \addtocounter{tmp}{1} + \pgfkeys{/child count/#3/.initial=0} + \pgfkeys{/child count/#5=\value{tmp}} +} +\def\commit #1 (#2) -> #3;{\commitcommon [commit] #1 (#2) -> [commit line] #3;} +\def\newcommit #1 (#2) -> #3;{\commitcommon [new commit] #1 (#2) -> +[new commit line] #3;} + +\def\branch #1 -> #2;{\ref [branch] "#1" : #1 -> #2;} +\def\oldbranch #1 -> #2;{\oldref [branch] "#1" : #1 -> #2;} + +\def\addHEAD [#1] "#2" : #3 -> #4;{ + \begin{pgfonlayer}{HEAD} + \node [#1, anchor=south] (#3) at (#4.south) {}; + \node [#1 label, anchor=south] (#3 label) at ($(#4.north)+(0,-3\gLine) + $) {#2}; + \end{pgfonlayer} +} +\def\addHEADbelow [#1] "#2" : #3 -> #4;{ + \begin{pgfonlayer}{HEAD} + \node [#1, anchor=north] (#3) at (#4.north) {}; + \node [#1 label, anchor=north] (#3 label) at ($(#4.south)+(0,3\gLine) + $) {#2}; + \end{pgfonlayer} +} + + +\def\HEAD -> #1;{\addHEAD [attached HEAD] "HEAD" : HEAD -> #1;} +\def\oldHEAD -> #1;{\addHEAD [old attached HEAD] "HEAD" : old HEAD -> #1;} + +\def\detachedHEAD -> #1;{\ref [HEAD] "HEAD" : HEAD -> #1;} +\def\olddetachedHEAD -> #1;{\oldref [HEAD] "HEAD" : HEAD -> #1;} + +\pagestyle{empty} +\setlength{\parindent}{0pt} diff --git "a/ta/\340\256\265\340\257\207\340\256\261\340\257\201\340\256\252\340\256\276\340\256\237\340\257\201.tex" "b/ta/\340\256\265\340\257\207\340\256\261\340\257\201\340\256\252\340\256\276\340\256\237\340\257\201.tex" new file mode 100644 index 0000000..ecf3baf --- /dev/null +++ "b/ta/\340\256\265\340\257\207\340\256\261\340\257\201\340\256\252\340\256\276\340\256\237\340\257\201.tex" @@ -0,0 +1,21 @@ +\input{common.tex} +\begin{document} +\begin{tikzpicture}[main] + \boundingbox + \normalcommits + \indexnode[0,-1.5] + \worknode[0,-3.5] + \branch main -> E; + \branch stable -> A; + \HEAD -> main; + + \path [line, bend right=20] + (index) edge node[cmd, auto=left] {git diff} (work) + (E) edge[bend left=20] node[cmd] {git diff --cached} (index) + (E) edge[bend left=30, auto=left] node[cmd] {git diff HEAD} (work) + (A) edge node[cmd] {git diff stable} (work) + (B) edge[bend left=25,auto=left] node[cmd] {git diff b325c da985} (D) + ; + +\end{tikzpicture} +\end{document}