├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ ├── codeql.yml │ ├── dependency-review.yml │ └── jekyll.yml ├── .gitignore ├── .ruby-version ├── CNAME ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── Rakefile ├── _config.yml ├── _includes ├── analytics-providers │ └── google.html ├── analytics.html ├── base_path ├── breadcrumbs.html ├── comments-providers │ └── scripts.html ├── footer.html ├── head.html ├── header.html ├── icon-sm-git.svg ├── icon-sm-migration.svg ├── light-hero.html ├── seo.html └── translation_buttons.html ├── _layouts ├── cheat-sheet.html └── default.html ├── _pages └── 404.md ├── assets ├── _scss │ ├── curriculum.scss │ ├── github_contribution_graph.scss │ └── timeline.scss ├── css │ ├── index.scss │ └── page.scss └── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 ├── downloads ├── ar │ └── github-git-cheat-sheet.md ├── az │ └── github-git-cheat-sheet.md ├── bn_BD │ └── github-git-cheat-sheet.md ├── de │ └── github-git-cheat-sheet.md ├── es_ES │ ├── github-git-cheat-sheet.md │ ├── github-git-cheat-sheet.pdf │ ├── submodule-vs-subtree-cheat-sheet.md │ └── subversion-migration.md ├── fa │ └── github-git-cheat-sheet.md ├── fr │ ├── github-git-cheat-sheet.md │ └── github-git-cheat-sheet.pdf ├── github-bash-cheat-sheet.md ├── github-git-advanced-cheat-sheet.md ├── github-git-cheat-sheet.md ├── github-git-cheat-sheet.pdf ├── github-git-concepts_BETA.md ├── gr │ └── github-git-cheat-sheet.md ├── gu │ └── github-git-cheat-sheet.md ├── hi │ └── github-git-cheat-sheet.md ├── id │ ├── github-git-advanced-cheat-sheet.md │ └── github-git-cheat-sheet.md ├── it │ ├── github-git-cheat-sheet.md │ └── subversion-migration.md ├── ja │ ├── github-git-cheat-sheet.md │ └── github-git-cheat-sheet.pdf ├── ko │ └── github-git-cheat-sheet.md ├── ml │ └── github-git-cheat-sheet.md ├── ne │ └── github-git-cheat-sheet.md ├── pl │ └── github-git-cheat-sheet.md ├── pt_BR │ ├── github-git-cheat-sheet.md │ └── github-git-cheat-sheet.pdf ├── pt_PT │ ├── github-git-cheat-sheet.md │ └── github-git-cheat-sheet.pdf ├── ru │ └── github-git-cheat-sheet.md ├── sk │ └── github-git-cheat-sheet.md ├── submodule-vs-subtree-cheat-sheet.md ├── subversion-migration.md ├── tr │ └── github-git-cheat-sheet.md ├── ua │ └── github-git-cheat-sheet.md ├── zh_CN │ └── github-git-cheat-sheet.md └── zh_TW │ └── github-git-cheat-sheet.md ├── git-guides ├── git-add.md ├── git-clone.md ├── git-commit.md ├── git-init.md ├── git-overview.md ├── git-pull.md ├── git-push.md ├── git-remote.md ├── git-status.md └── install-git.md ├── index.html ├── package-lock.json ├── package.json ├── redirects-cheatsheets.md ├── redirects.md └── script ├── bootstrap ├── build ├── package └── server /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | 3 | 4 | 5 | ### Extra detail 6 | 7 | 8 | #### Screenshots 9 | 10 | 11 | 12 | #### Reasoning 13 | 14 | 15 | 16 | ### How to contribute 17 | 18 | - Comment on this issue if you'd like to work/collaborate on it! 19 | - Fork the [repository](https://github.com/github/training-kit). 20 | - Use the [GitHub Flow](https://guides.github.com/introduction/flow/) to make changes to your fork. [This](https://github.com/skills/introduction-to-github) is a refresher course if you're unsure about how to make a change on GitHub. 21 | - Push your changes to your repository. 22 | - Submit a Pull Request 23 | - Base Dropdown: github/training-kit 24 | - Compare Dropdown: Your fork 25 | 26 | #### Testing locally 27 | 28 | If you'd like to make and test changes locally (and see how they would look if merged), do the following: 29 | 30 | - In your command line: 31 | - [Install Git](https://git-scm.com/) 32 | - [Install Ruby](https://www.ruby-lang.org/en/documentation/installation/) 33 | - [ ] Run `script/setup` 34 | - [ ] Run `script/server`. 35 | - When successful, the script will initiate a local server at `http://127.0.0.1:4000/`. 36 | 37 | ### Questions? 38 | 39 | - Leave a comment on this issue! Make sure to use `@mentions` if you want a specific person's attention! 40 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | 3 | 8 | 9 | ## Questions 10 | 11 | 12 | 13 | ## Next steps 14 | 15 | 16 | 17 | ## Review 18 | 19 | 20 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Please see the documentation for all configuration options: 2 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 3 | 4 | version: 2 5 | updates: 6 | 7 | # Maintain dependencies for GitHub Actions 8 | - package-ecosystem: "github-actions" 9 | directory: "/" 10 | schedule: 11 | interval: "monthly" 12 | 13 | # Maintain dependencies for Bundler 14 | - package-ecosystem: "bundler" 15 | directory: "/" 16 | schedule: 17 | interval: "monthly" 18 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | # The branches below must be a subset of the branches above 8 | branches: [ "main" ] 9 | 10 | jobs: 11 | analyze: 12 | name: Analyze 13 | runs-on: ubuntu-latest 14 | permissions: 15 | actions: read 16 | contents: read 17 | security-events: write 18 | 19 | strategy: 20 | fail-fast: false 21 | matrix: 22 | language: [ 'ruby' ] 23 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 24 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 25 | 26 | steps: 27 | - name: Checkout repository 28 | uses: actions/checkout@v3 29 | 30 | # Initializes the CodeQL tools for scanning. 31 | - name: Initialize CodeQL 32 | uses: github/codeql-action/init@v2 33 | with: 34 | languages: ${{ matrix.language }} 35 | # If you wish to specify custom queries, you can do so here or in a config file. 36 | # By default, queries listed here will override any specified in a config file. 37 | # Prefix the list here with "+" to use these queries and those in the config file. 38 | 39 | # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 40 | # queries: security-extended,security-and-quality 41 | 42 | 43 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 44 | # If this step fails, then you should remove it and run the build manually (see below) 45 | - name: Autobuild 46 | uses: github/codeql-action/autobuild@v2 47 | 48 | # ℹ️ Command-line programs to run using the OS shell. 49 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 50 | 51 | # If the Autobuild fails above, remove it and uncomment the following three lines. 52 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 53 | 54 | # - run: | 55 | # echo "Run, Build Application using script" 56 | # ./location_of_script_within_repo/buildscript.sh 57 | 58 | - name: Perform CodeQL Analysis 59 | uses: github/codeql-action/analyze@v2 60 | with: 61 | category: "/language:${{matrix.language}}" 62 | -------------------------------------------------------------------------------- /.github/workflows/dependency-review.yml: -------------------------------------------------------------------------------- 1 | # Dependency Review Action 2 | # 3 | # This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. 4 | # 5 | # Source repository: https://github.com/actions/dependency-review-action 6 | # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement 7 | name: 'Dependency Review' 8 | on: [pull_request] 9 | 10 | permissions: 11 | contents: read 12 | 13 | jobs: 14 | dependency-review: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: 'Checkout Repository' 18 | uses: actions/checkout@v3 19 | - name: 'Dependency Review' 20 | uses: actions/dependency-review-action@v2 21 | -------------------------------------------------------------------------------- /.github/workflows/jekyll.yml: -------------------------------------------------------------------------------- 1 | name: Deploy Jekyll site to Pages 2 | 3 | on: 4 | # Runs on pushes targeting the default branch 5 | push: 6 | branches: ["main"] 7 | # Runs on pull requests targeting the default branch 8 | pull_request: 9 | branches: [ "main" ] 10 | 11 | # Allows us to run this workflow manually from the Actions tab 12 | workflow_dispatch: 13 | 14 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 15 | permissions: 16 | contents: read 17 | pages: write 18 | id-token: write 19 | 20 | # Allow one concurrent deployment 21 | concurrency: 22 | group: "pages" 23 | cancel-in-progress: true 24 | 25 | jobs: 26 | # Build job 27 | build: 28 | runs-on: ubuntu-latest 29 | steps: 30 | - name: Checkout 31 | uses: actions/checkout@v3 32 | - name: Set up Node 33 | uses: actions/setup-node@v3 34 | with: 35 | node-version: 16 36 | cache: 'npm' 37 | - name: Install node modules 38 | run: npm install 39 | - name: Set up Ruby 40 | uses: ruby/setup-ruby@ece82769428359c077b5a5eaff268902a303c101 41 | with: 42 | bundler-cache: true # runs 'bundle install' and caches installed gems automatically 43 | - name: Set up Pages 44 | id: pages 45 | uses: actions/configure-pages@v2 46 | - name: Build and test with Rake 47 | # Only run in pull requests 48 | if: github.event_name == 'pull_request' 49 | run: bundle exec rake 50 | - name: Build with Jekyll 51 | # Don't run in pull requests 52 | if: github.event_name != 'pull_request' 53 | # Outputs to the './_site' directory by default 54 | run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" 55 | env: 56 | JEKYLL_ENV: production 57 | - name: Upload artifact 58 | # Automatically uploads an artifact from the './_site' directory by default 59 | uses: actions/upload-pages-artifact@v1 60 | 61 | # Deployment job 62 | deploy: 63 | # Only run on pushes to the default branch 64 | if: github.event_name == 'push' && github.ref == 'refs/heads/main' 65 | environment: 66 | name: github-pages 67 | url: ${{ steps.deployment.outputs.page_url }} 68 | runs-on: ubuntu-latest 69 | needs: build 70 | steps: 71 | - name: Deploy to GitHub Pages 72 | id: deployment 73 | uses: actions/deploy-pages@v1 74 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _site/ 2 | .DS_Store 3 | /.rbenv-version 4 | /vendor/ 5 | /bin/ 6 | /.bundle/ 7 | .sass-cache/ 8 | *.*~ 9 | _release 10 | *.map 11 | .jekyll-metadata 12 | node_modules/ 13 | # *.resume-burger-jokes 14 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.1.2 2 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | training.github.com -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [services@github.com](mailto:services@github.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to training-kit 2 | 3 | 🎉 Thank you for taking the time to contribute and for seeking out these instructions. We :heart: community contributions to these materials. 4 | 5 | --- 6 | 7 | ## Code of Conduct 8 | 9 | This project and everyone who participates in it is governed by the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [services@github.com](mailto:services@github.com). 10 | 11 | --- 12 | 13 | ## What should I know before I get started? 14 | 15 | ### The goal of these resources 16 | 17 | These materials are designed to help those new to Git, GitHub and software development as a whole. By using these materials, we hope users will: 18 | 19 | - Feel welcome and become active contributors in the open source community 20 | - Learn best practices for using Git and GitHub 21 | - Learn how to use the applications within GitHub's ecosystem to build better software 22 | 23 | ### Types of contributions we love 24 | 25 | We're always looking for contributions to help improve these resources. This includes: 26 | 27 | - Improving the existing cheat sheets 28 | - Translations of existing cheat sheets into new languages 29 | - Adding new courseware or resources aligned with the [goals](#the-goal-of-these-resources) 30 | 31 | --- 32 | 33 | ## How to contribute 34 | 35 | ### Report a bug 36 | 37 | Oops, thanks for finding that! If you know how to fix it, please feel free to fork the repository and submit a change via Pull Request. 38 | 39 | If you aren't sure how to fix it or just don't have time, we invite you to open a [new Issue](https://github.com/github/training-kit/issues/new). Please be sure to provide information, so we can recreate the error. 40 | 41 | ### Translate existing resources 42 | 43 | Several community members have been kind enough to translate the Git Cheat Sheets into various languages. At this time, we are only set up to serve the cheat sheets in various languages (but maybe you can help us change that 😉). If you are planning to contribute a translation, please do the following: 44 | 45 | - Fork this repository 46 | - Create a new folder in the [downloads directory](https://github.com/github/training-kit/tree/main/downloads) using the standard abbreviation for the language you are providing. 47 | - Copy the most recent [English version of the cheat sheet](https://github.com/github/training-kit/blob/main/downloads/github-git-cheat-sheet.md) to the folder you created. 48 | - Complete the translation 49 | - Add a link to the translated resource on [/index.html](https://github.com/github/training-kit/blob/main/index.html) 50 | - Open a pull request against the `main` branch of this repository. 51 | - Be sure to @ mention a couple of your friends who are native speakers and ask them to review the translation. 52 | - Update your translation based on feedback from your friends. 53 | 54 | When this process is complete, we will be happy to merge the completed document. 55 | 56 | ### Contribute something new 57 | 58 | Whether you have an idea to make it better, or want to contribute a whole new course or resource ... we :heart: new ideas! We invite you to open a new [Issue](https://github.com/github/training-kit/issues/new) to talk about it before you invest too much time. Of course, if you want to experiment first, you can [fork this repository](https://help.github.com/articles/working-with-forks/) and submit your idea via a Pull Request. 59 | 60 | When you are contributing something new, we ask you to be familiar with our content philosophy, the structure of the repository, and building [Jekyll](https://jekyllrb.com/) sites locally. See the sections below for more information. 61 | 62 | ### Not sure where to start? 63 | 64 | If you just want to help out, but don't have a particular change in mind, check out the [open issues](https://github.com/github/training-kit/issues) for projects you can tackle, review an [open pull request](https://github.com/github/training-kit/pulls), or check out [the project ROADMAP](https://github.com/github/training-kit/projects/1). 65 | 66 | --- 67 | 68 | ### Styling content 69 | 70 | This site uses GitHub's CSS toolkit called [Primer](https://github.com/primer/primer-css). It's easy to use, and if your contribution requires some design or front-end work you should check out the [Primer Docs](http://primercss.io/). 71 | 72 | For writing style guides, we lean on the [GitHub Brand Guide](https://brand.github.com/). The [Content](https://brand.github.com/content/) section is a great place to start. 73 | 74 | ### Building and testing 75 | 76 | When you are ready to test your changes, you will want to build the repository locally. This is fully automated through a series of shell scripts based [the scripts to rule them all](https://github.com/github/scripts-to-rule-them-all)! 77 | 78 | To build the materials do the following: 79 | 80 | 1. Run `script/bootstrap` to install the dependencies 81 | 1. Run `script/build` to build the site 82 | 1. Run `script/server` 83 | - When successful, the script will initiate a local server at `http://127.0.0.1:4000/`. 84 | 1. Simply paste that into your favorite web-browser, and you will be ready to test 85 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem 'jekyll' 4 | gem 'html-proofer' 5 | gem 'rake' 6 | 7 | group :jekyll_plugins do 8 | gem 'jekyll-sass-converter', github: 'jekyll/jekyll-sass-converter' 9 | gem 'sass-embedded' 10 | gem 'jekyll-paginate' 11 | gem 'jekyll-sitemap' 12 | gem 'jekyll-gist' 13 | gem 'jekyll-feed' 14 | gem 'jemoji' 15 | gem 'jekyll-redirect-from' 16 | gem 'jekyll-octicons' 17 | end 18 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: https://github.com/jekyll/jekyll-sass-converter.git 3 | revision: 13d2054514b23ee3f221c4c51eb25bea9bc951f5 4 | specs: 5 | jekyll-sass-converter (2.2.0) 6 | sass-embedded (~> 1.54) 7 | 8 | GEM 9 | remote: https://rubygems.org/ 10 | specs: 11 | activesupport (7.0.4) 12 | concurrent-ruby (~> 1.0, >= 1.0.2) 13 | i18n (>= 1.6, < 2) 14 | minitest (>= 5.1) 15 | tzinfo (~> 2.0) 16 | addressable (2.8.1) 17 | public_suffix (>= 2.0.2, < 6.0) 18 | async (2.2.1) 19 | console (~> 1.10) 20 | io-event (~> 1.1.0) 21 | timers (~> 4.1) 22 | colorator (1.1.0) 23 | concurrent-ruby (1.1.10) 24 | console (1.16.2) 25 | fiber-local 26 | em-websocket (0.5.3) 27 | eventmachine (>= 0.12.9) 28 | http_parser.rb (~> 0) 29 | ethon (0.15.0) 30 | ffi (>= 1.15.0) 31 | eventmachine (1.2.7) 32 | faraday (2.6.0) 33 | faraday-net_http (>= 2.0, < 3.1) 34 | ruby2_keywords (>= 0.0.4) 35 | faraday-net_http (3.0.1) 36 | ffi (1.15.5) 37 | fiber-local (1.0.0) 38 | forwardable-extended (2.6.0) 39 | gemoji (3.0.1) 40 | google-protobuf (3.21.9) 41 | html-pipeline (2.14.3) 42 | activesupport (>= 2) 43 | nokogiri (>= 1.4) 44 | html-proofer (5.0.0) 45 | addressable (~> 2.3) 46 | async (~> 2.1) 47 | nokogiri (~> 1.13) 48 | rainbow (~> 3.0) 49 | typhoeus (~> 1.3) 50 | yell (~> 2.0) 51 | zeitwerk (~> 2.5) 52 | http_parser.rb (0.8.0) 53 | i18n (1.12.0) 54 | concurrent-ruby (~> 1.0) 55 | io-event (1.1.2) 56 | jekyll (4.3.1) 57 | addressable (~> 2.4) 58 | colorator (~> 1.0) 59 | em-websocket (~> 0.5) 60 | i18n (~> 1.0) 61 | jekyll-sass-converter (>= 2.0, < 4.0) 62 | jekyll-watch (~> 2.0) 63 | kramdown (~> 2.3, >= 2.3.1) 64 | kramdown-parser-gfm (~> 1.0) 65 | liquid (~> 4.0) 66 | mercenary (>= 0.3.6, < 0.5) 67 | pathutil (~> 0.9) 68 | rouge (>= 3.0, < 5.0) 69 | safe_yaml (~> 1.0) 70 | terminal-table (>= 1.8, < 4.0) 71 | webrick (~> 1.7) 72 | jekyll-feed (0.17.0) 73 | jekyll (>= 3.7, < 5.0) 74 | jekyll-gist (1.5.0) 75 | octokit (~> 4.2) 76 | jekyll-octicons (17.7.0) 77 | jekyll (>= 3.6, < 5.0) 78 | octicons (= 17.7.0) 79 | jekyll-paginate (1.1.0) 80 | jekyll-redirect-from (0.16.0) 81 | jekyll (>= 3.3, < 5.0) 82 | jekyll-sitemap (1.4.0) 83 | jekyll (>= 3.7, < 5.0) 84 | jekyll-watch (2.2.1) 85 | listen (~> 3.0) 86 | jemoji (0.12.0) 87 | gemoji (~> 3.0) 88 | html-pipeline (~> 2.2) 89 | jekyll (>= 3.0, < 5.0) 90 | kramdown (2.4.0) 91 | rexml 92 | kramdown-parser-gfm (1.1.0) 93 | kramdown (~> 2.0) 94 | liquid (4.0.3) 95 | listen (3.7.1) 96 | rb-fsevent (~> 0.10, >= 0.10.3) 97 | rb-inotify (~> 0.9, >= 0.9.10) 98 | mercenary (0.4.0) 99 | mini_portile2 (2.8.0) 100 | minitest (5.16.3) 101 | nokogiri (1.13.9) 102 | mini_portile2 (~> 2.8.0) 103 | racc (~> 1.4) 104 | octicons (17.7.0) 105 | octokit (4.25.1) 106 | faraday (>= 1, < 3) 107 | sawyer (~> 0.9) 108 | pathutil (0.16.2) 109 | forwardable-extended (~> 2.6) 110 | public_suffix (5.0.0) 111 | racc (1.6.0) 112 | rainbow (3.1.1) 113 | rake (13.0.6) 114 | rb-fsevent (0.11.2) 115 | rb-inotify (0.10.1) 116 | ffi (~> 1.0) 117 | rexml (3.2.5) 118 | rouge (4.0.0) 119 | ruby2_keywords (0.0.5) 120 | safe_yaml (1.0.5) 121 | sass-embedded (1.55.0) 122 | google-protobuf (~> 3.19) 123 | rake (>= 10.0.0) 124 | sawyer (0.9.2) 125 | addressable (>= 2.3.5) 126 | faraday (>= 0.17.3, < 3) 127 | terminal-table (3.0.2) 128 | unicode-display_width (>= 1.1.1, < 3) 129 | timers (4.3.5) 130 | typhoeus (1.4.0) 131 | ethon (>= 0.9.0) 132 | tzinfo (2.0.5) 133 | concurrent-ruby (~> 1.0) 134 | unicode-display_width (2.3.0) 135 | webrick (1.7.0) 136 | yell (2.2.2) 137 | zeitwerk (2.6.1) 138 | 139 | PLATFORMS 140 | ruby 141 | 142 | DEPENDENCIES 143 | html-proofer 144 | jekyll 145 | jekyll-feed 146 | jekyll-gist 147 | jekyll-octicons 148 | jekyll-paginate 149 | jekyll-redirect-from 150 | jekyll-sass-converter! 151 | jekyll-sitemap 152 | jemoji 153 | rake 154 | sass-embedded 155 | 156 | BUNDLED WITH 157 | 2.3.19 158 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitHub Training Kit 2 | 3 | Open source courseware from the GitHub Professional Services team. 4 | 5 | ## We ❤️ contributors like you 6 | 7 | **We’re eager to work with you**, our user community, to improve these materials and develop new ones. Please check out our [CONTRIBUTING guide](CONTRIBUTING.md) for more information on getting started. 8 | 9 | ## Looking for a resource that was once housed in training-kit? 10 | 11 | This repository currently contains Git and GitHub cheat sheets. If you're looking for a project that used to be housed here, such as On-Demand training, reading lists, videos, and book recommendations, see [this commit](https://github.com/github/training-kit/tree/4fbf180e980ef973ba4cc4b8ef3d5f278ddc8c08) in the repository's history. 12 | 13 | ## Projects used in training-kit 14 | 15 | - We use [Jekyll](https://jekyllrb.com/) and [Markdown](https://guides.github.com/features/mastering-markdown/). 16 | - Our content is styled using the [Primer CSS toolkit](https://github.com/primer/primer-css). 17 | 18 | ## Packaging for viewing behind your firewall 19 | 20 | If you'd like to have a copy of the files to be served from a web server inside your firewall, start by running `script/package`. 21 | 22 | 1. Run `script/package` to create a release tarball. This will be in the format `release-XXXXXXX.tgz` for you to take wherever you want. 23 | 2. To test this looks okay, create some folders `mkdir -p test_site/kit`. 24 | 3. Extract the release, `tar -xzf release-XXXXXXX.tgz -C test_site/kit`. 25 | 4. Switch into the test_site directory, `cd test_site`. 26 | 5. View the site: 27 | - For python version 2.x, run: `python -m SimpleHTTPServer` 28 | - For python version 3.x, run: `python -m http.server` 29 | - _Note: Some servers are more advanced than others and can handle redirects, smart recognition of `.html` files, etc_ 30 | 31 | Site content is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/). CC-BY-4.0 gives you permission to use the content for almost any purpose but does not grant you any trademark permissions, so long as you note the license and give credit, such as follows: 32 | 33 | > Content based on [github.github.com/training-kit/](https://github.github.com/training-kit) used under the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) license. 34 | 35 | Code used to build and test the site as well as code samples on the site, if any, are licensed under [CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/legalcode). CC0 waives all copyright restrictions but does not grant you any trademark permissions. 36 | 37 | This means you can use the content and code in this repository except for GitHub trademarks in your projects. 38 | 39 | When you contribute to this repository you are doing so under the above licenses. 40 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'html-proofer' 2 | require 'jekyll' 3 | 4 | Rake.application.options.trace = true 5 | 6 | desc 'Remove all generated files: destination folder, metadata file, Sass and Jekyll caches.' 7 | task :clean do 8 | Jekyll::Commands::Clean.process({}) 9 | end 10 | 11 | desc 'Build and serve the site' 12 | task serve: [:build] do 13 | Jekyll::Commands::Serve.process({}) 14 | end 15 | 16 | desc 'Build the site' 17 | task build: [:clean] do 18 | Jekyll::Commands::Build.process({}) 19 | end 20 | 21 | desc 'Build and test the site' 22 | task test: [:build] do 23 | options = { 24 | :check_html => true, # Validate HTML 25 | :empty_alt_ignore => false, # Allow images with empty alt tags 26 | :check_favicon => true, # Check whether favicons are valid 27 | :check_img_http => true, # Enforce that images use HTTPS 28 | typhoeus: { 29 | headers: { 30 | # This is required to validate links to docs.github.com 31 | "Accept-Encoding" => "gzip", 32 | } 33 | } 34 | } 35 | HTMLProofer.check_directory("./_site", options).run 36 | end 37 | 38 | task default: :test 39 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # For Atom Feed 2 | domain: services.github.com 3 | author: GitHub, Inc. 4 | email: services@github.com 5 | 6 | # Site Settings 7 | locale: "en-US" 8 | # Keep original, do not replace 9 | title: "GitHub Cheatsheets" 10 | title_separator: "-" 11 | name: "GitHub, Inc." 12 | description: 13 | url: "https://training.github.com" 14 | baseurl: "" # the subpath of your site, e.g. "/blog" 15 | gh_repo: github/training-kit 16 | repository: github/training-kit 17 | teaser: # filename of teaser fallback teaser image placed in /images/, .e.g. "500x300.png" 18 | breadcrumbs: true # true, false (default) 19 | words_per_minute: 200 20 | 21 | analytics: 22 | provider: google # false (default), "google", "google-universal", "custom" 23 | google: 24 | tracking_id: UA-3769691-2 25 | 26 | markdown_ext: "markdown,mkdown,mkdn,mkd,md" 27 | 28 | # Conversion 29 | markdown: kramdown 30 | highlighter: rouge 31 | lsi: false 32 | excerpt_separator: "\n\n" 33 | incremental: false 34 | 35 | # Standard jekyll configuration 36 | parentsite: https://services.github.com 37 | permalink: /articles/:title/ 38 | plugins: 39 | - jekyll-paginate 40 | - jekyll-sitemap 41 | - jekyll-gist 42 | - jekyll-feed 43 | - jemoji 44 | - jekyll-redirect-from 45 | - jekyll-octicons 46 | 47 | exclude: 48 | - bin 49 | - config.rb 50 | - Gemfile* 51 | - gems 52 | - node_modules 53 | - Procfile 54 | - Rakefile 55 | - README.md 56 | - script 57 | - vendor 58 | - package.json 59 | - package-lock.json 60 | 61 | collections: 62 | modules: 63 | output: true 64 | courses: 65 | output: true 66 | 67 | include: 68 | - _stylesheets 69 | - _javascript 70 | 71 | # Primer CSS (https://primer.style/css/getting-started#for-a-jekyll-site) 72 | sass: 73 | sass_dir: assets/css 74 | load_paths: 75 | - assets/_scss 76 | - node_modules 77 | style: compressed 78 | implementation: sass-embedded 79 | 80 | # Custom site configuration 81 | lang: en 82 | 83 | defaults: 84 | - scope: 85 | path: "" 86 | values: 87 | lang: "en" 88 | redirect_to: 89 | - https://training.github.com 90 | -------------------------------------------------------------------------------- /_includes/analytics-providers/google.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_includes/analytics.html: -------------------------------------------------------------------------------- 1 | {% if site.analytics.provider and page.analytics != false %} 2 | 3 | {% case site.analytics.provider %} 4 | {% when "google" %} 5 | {% include /analytics-providers/google.html %} 6 | {% when "google-universal" %} 7 | {% include /analytics-providers/google-universal.html %} 8 | {% when "custom" %} 9 | {% include /analytics-providers/custom.html %} 10 | {% endcase %} 11 | 12 | {% endif %} -------------------------------------------------------------------------------- /_includes/base_path: -------------------------------------------------------------------------------- 1 | {% capture base_path %}{{ site.url }}{{ site.baseurl }}{% endcapture %} -------------------------------------------------------------------------------- /_includes/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | {% case site.categories.type %} 2 | {% when "liquid" %} 3 | {% assign path_type = "#" %} 4 | {% when "jekyll-archives" %} 5 | {% assign path_type = nil %} 6 | {% endcase %} 7 | 8 | {% if page.collection != 'posts' %} 9 | {% assign path_type = nil %} 10 | {% assign crumb_path = '/' %} 11 | {% else %} 12 | {% assign crumb_path = site.categories.path %} 13 | {% endif %} 14 | 15 | {% if page.breadcrumbColor %} 16 | {% assign breadClass = page.breadcrumbColor %} 17 | {% else %} 18 | {% assign breadClass = "bg-blue-light" %} 19 | {% endif %} 20 | 21 | {% if page.breadcrumbSize %} 22 | {% assign size = page.breadcrumbSize %} 23 | {% else %} 24 | {% assign size = "md" %} 25 | {% endif %} 26 | 27 | 56 | -------------------------------------------------------------------------------- /_includes/comments-providers/scripts.html: -------------------------------------------------------------------------------- 1 | {% if site.comments.provider and page.comments %} 2 | 3 | {% case site.comments.provider %} 4 | {% when "disqus" %} 5 | {% include /comments-providers/disqus.html %} 6 | {% when "discourse" %} 7 | {% include /comments-providers/discourse.html %} 8 | {% when "facebook" %} 9 | {% include /comments-providers/facebook.html %} 10 | {% when "google-plus" %} 11 | {% include /comments-providers/google-plus.html %} 12 | {% when "custom" %} 13 | {% include /comments-providers/custom.html %} 14 | {% endcase %} 15 | 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {% include seo.html %} 9 | 10 | 11 | -------------------------------------------------------------------------------- /_includes/header.html: -------------------------------------------------------------------------------- 1 | {% if page.lang %} 2 | {% assign lang = page.lang %} 3 | {% else %} 4 | {% assign lang = "en" %} 5 | {% endif %} 6 | {% assign nav = site.data.navigation["main"][lang] %} 7 | 8 |
9 | 27 |
28 | -------------------------------------------------------------------------------- /_includes/icon-sm-git.svg: -------------------------------------------------------------------------------- 1 | icon-sm-git 2 | -------------------------------------------------------------------------------- /_includes/icon-sm-migration.svg: -------------------------------------------------------------------------------- 1 | icon-sm-migration 2 | -------------------------------------------------------------------------------- /_includes/light-hero.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{ page.title }}

4 | {% if page.description %} 5 |

{{ page.description }}

6 | {% endif %} 7 | {% include translation_buttons.html %} 8 |
9 |
10 | -------------------------------------------------------------------------------- /_includes/seo.html: -------------------------------------------------------------------------------- 1 | {% include base_path %} 2 | 3 | 4 | {% if site.url %} 5 | {% assign seo_url = site.url | append: site.baseurl %} 6 | {% endif %} 7 | {% assign seo_url = seo_url | default: site.github.url %} 8 | 9 | {% if page.title %} 10 | {% assign seo_title = page.title | append: " " | append: site.title_separator | append: " " | append: site.title %} 11 | {% endif %} 12 | 13 | {% if seo_title %} 14 | {% assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once %} 15 | {% endif %} 16 | 17 | {% if site.url %} 18 | {% assign canonical_url = page.url | prepend: seo_url | replace: "/index.html", "/" %} 19 | {% endif %} 20 | 21 | {{ seo_title | default: site.title }}{% if paginator %}{% unless paginator.page == 1 %} {{ site.title_separator }} {{ site.data.ui-text[site.locale].page }} {{ paginator.page }}{% endunless %}{% endif %} 22 | 23 | {% assign seo_description = page.description | default: page.excerpt | default: site.description %} 24 | {% if seo_description %} 25 | {% assign seo_description = seo_description | markdownify | strip_html | strip_newlines | escape_once %} 26 | {% endif %} 27 | 28 | {% assign seo_author = page.author | default: page.author[0] | default: site.author[0] %} 29 | {% if seo_author %} 30 | {% if seo_author.twitter %} 31 | {% assign seo_author_twitter = seo_author.twitter %} 32 | {% else %} 33 | {% if site.data.authors and site.data.authors[seo_author] %} 34 | {% assign seo_author_twitter = site.data.authors[seo_author].twitter %} 35 | {% else %} 36 | {% assign seo_author_twitter = seo_author %} 37 | {% endif %} 38 | {% endif %} 39 | {% assign seo_author_twitter = seo_author_twitter | replace: "@", "" %} 40 | {% endif %} 41 | 42 | 43 | 44 | 45 | 46 | 47 | {% if seo_url %} 48 | 49 | 50 | {% endif %} 51 | 52 | {% if page.excerpt %} 53 | 54 | {% endif %} 55 | 56 | {% if site.twitter.username %} 57 | 58 | 59 | 60 | 61 | 62 | {% if page.header.image %} 63 | 64 | 65 | {% else %} 66 | 67 | {% if site.og_image %} 68 | 69 | 70 | {% endif %} 71 | {% endif %} 72 | 73 | {% if seo_author_twitter %} 74 | 75 | {% endif %} 76 | {% endif %} 77 | 78 | {% if site.facebook %} 79 | {% if site.facebook.publisher %} 80 | 81 | {% endif %} 82 | 83 | {% if site.facebook.app_id %} 84 | 85 | {% endif %} 86 | {% endif %} 87 | 88 | {% if page.header.image %} 89 | 90 | {% endif %} 91 | 92 | {% if page.date %} 93 | 94 | 95 | {% if page.next.url %} 96 | 97 | {% endif %} 98 | {% if page.previous.url %} 99 | 100 | {% endif %} 101 | {% endif %} 102 | 103 | {% if site.og_image %} 104 | 112 | {% endif %} 113 | 114 | {% if site.social %} 115 | 124 | {% endif %} 125 | 126 | {% if site.google_site_verification %} 127 | 128 | {% endif %} 129 | {% if site.bing_site_verification %} 130 | 131 | {% endif %} 132 | {% if site.owner.alexa.verify %} 133 | 134 | {% endif %} 135 | {% if site.owner.yandex.verify %} 136 | 137 | {% endif %} 138 | 139 | -------------------------------------------------------------------------------- /_includes/translation_buttons.html: -------------------------------------------------------------------------------- 1 |

2 | {% assign pages=site.pages | where:"ref", page.ref | sort: 'lang' %} 3 | {% for thispage in pages %} 4 | {% if page.lang != thispage.lang %} 5 | {{ site.data.ui-text[thispage.lang].name | downcase }} 6 | {% endif %} 7 | {% endfor %} 8 |

9 | -------------------------------------------------------------------------------- /_layouts/cheat-sheet.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 | {{ content }} 8 |
9 |
10 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% include head.html %} 5 | 6 | 7 | {% include header.html %} 8 | 9 |
10 | {{ content }} 11 |
12 | 13 | {% include footer.html %} 14 | 15 | -------------------------------------------------------------------------------- /_pages/404.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Page Not Found" 3 | layout: single 4 | excerpt: "Page not found. Your pixels are in another canvas." 5 | sitemap: false 6 | permalink: /404.html 7 | --- 8 | 9 | Sorry, but the page you were trying to view does not exist --- perhaps you can try searching for it below. 10 | 11 | 15 | 18 | -------------------------------------------------------------------------------- /assets/_scss/github_contribution_graph.scss: -------------------------------------------------------------------------------- 1 | .contribution_graph { 2 | font-size: $font-size-small; 3 | color: var(--color-scale-gray-7); 4 | padding: $spacer-2; 5 | border-radius: 4px; 6 | border: 1px solid var(--color-border-tertiary); 7 | } 8 | 9 | .svg-tip { 10 | padding: 10px; 11 | background: rgba(0,0,0,0.8); 12 | color: #bbb; 13 | font-size: 12px; 14 | position: absolute; 15 | z-index: 99999; 16 | text-align: center; 17 | border-radius: 3px; 18 | } 19 | 20 | .svg-tip:after { 21 | -moz-box-sizing: border-box; 22 | box-sizing: border-box; 23 | position: absolute; 24 | left: 50%; 25 | height: 5px; 26 | width: 5px; 27 | bottom: -10px; 28 | margin: 0 0 0 -5px; 29 | content: " "; 30 | border: 5px solid transparent; 31 | border-top-color: rgba(0,0,0,0.8); 32 | } 33 | 34 | .expanded-tip { 35 | padding: 10px; 36 | margin: 10px; 37 | width: 721px; 38 | background: rgba(0,0,0,0.8); 39 | color: #bbb; 40 | font-size: 12px; 41 | position: absolute; 42 | z-index: 99999; 43 | text-align: center; 44 | border-radius: 3px; 45 | } 46 | 47 | .expanded-tip:after { 48 | -moz-box-sizing: border-box; 49 | box-sizing: border-box; 50 | position: absolute; 51 | text-align: center; 52 | left: 50%; 53 | height: 5px; 54 | width: 5px; 55 | top: -10px; 56 | margin: 0 0 0 -5px; 57 | content: " "; 58 | border: 5px solid transparent; 59 | border-bottom-color: rgba(0,0,0,0.8); 60 | } 61 | 62 | .user_avatar { 63 | width: 40px; 64 | margin: 2px; 65 | height: 40px; 66 | display: inline-block; 67 | } 68 | -------------------------------------------------------------------------------- /assets/_scss/timeline.scss: -------------------------------------------------------------------------------- 1 | .timeline { 2 | position: relative; 3 | padding: 0; 4 | list-style: none; 5 | } 6 | 7 | .timeline:before { 8 | content: ""; 9 | position: absolute; 10 | top: 0; 11 | bottom: 0; 12 | left: 40px; 13 | width: 2px; 14 | margin-left: -1.5px; 15 | background-color: var(--color-scale-gray-2); 16 | } 17 | 18 | .timeline-image { 19 | transition: box-shadow 0.2s ease-in-out; 20 | 21 | &:hover { box-shadow: 0 1px 15px rgba(black, 0.2) } 22 | } 23 | 24 | .timeline>li { 25 | position: relative; 26 | margin-bottom: 50px; 27 | min-height: 50px; 28 | } 29 | 30 | .timeline>li:before, 31 | .timeline>li:after { 32 | content: ""; 33 | display: table; 34 | } 35 | 36 | .timeline>li:after { 37 | clear: both; 38 | } 39 | 40 | .timeline>li .timeline-panel { 41 | float: right; 42 | position: relative; 43 | width: 100%; 44 | padding: 0 20px 0 100px; 45 | text-align: left; 46 | } 47 | 48 | .timeline>li .timeline-panel:before { 49 | right: auto; 50 | left: -15px; 51 | border-right-width: 15px; 52 | border-left-width: 0; 53 | } 54 | 55 | .timeline>li .timeline-panel:after { 56 | right: auto; 57 | left: -14px; 58 | border-right-width: 14px; 59 | border-left-width: 0; 60 | } 61 | 62 | .timeline>li .timeline-panel-info { 63 | float: left; 64 | padding: 0 20px 0 250px; 65 | text-align: left; 66 | } 67 | 68 | .timeline>li .timeline-panel-info:before { 69 | right: auto; 70 | left: -15px; 71 | border-right-width: 15px; 72 | border-left-width: 0; 73 | } 74 | 75 | .timeline>li .timeline-panel-info:after { 76 | right: auto; 77 | left: -14px; 78 | border-right-width: 14px; 79 | border-left-width: 0; 80 | } 81 | 82 | 83 | 84 | 85 | .timeline>li .timeline-image { 86 | z-index: 100; 87 | position: absolute; 88 | left: 0; 89 | width: 80px; 90 | height: 80px; 91 | margin-left: 0; 92 | border: 4px solid var(--color-border-primary); 93 | border-radius: 100%; 94 | text-align: center; 95 | color: var(--color-text-white); 96 | background-color: var(--color-bg-primary); 97 | } 98 | 99 | .timeline>li p{ 100 | margin-top: 12px; 101 | font-size: 14px; 102 | line-height: 17px; 103 | } 104 | 105 | .timeline>li.timeline-inverted>.timeline-panel { 106 | float: right; 107 | padding: 0 20px 0 100px; 108 | text-align: left; 109 | } 110 | 111 | .timeline>li.timeline-inverted>.timeline-panel:before { 112 | right: auto; 113 | left: -15px; 114 | border-right-width: 15px; 115 | border-left-width: 0; 116 | } 117 | 118 | .timeline>li.timeline-inverted>.timeline-panel:after { 119 | right: auto; 120 | left: -14px; 121 | border-right-width: 14px; 122 | border-left-width: 0; 123 | } 124 | 125 | .timeline>li:last-child { 126 | margin-bottom: 0; 127 | } 128 | 129 | .timeline .timeline-heading h4 { 130 | margin-top: 0; 131 | color: inherit; 132 | } 133 | 134 | .timeline .timeline-heading h4.subheading { 135 | text-transform: none; 136 | } 137 | 138 | .timeline .timeline-body>p, 139 | .timeline .timeline-body>ul { 140 | margin-bottom: 0; 141 | } 142 | 143 | .timeline .timeline-body-info>p { 144 | padding-left: 150px; 145 | padding-right: 10px; 146 | } 147 | 148 | @media(min-width:768px) { 149 | .timeline:before { 150 | left: 50%; 151 | } 152 | 153 | .timeline>li { 154 | margin-bottom: 100px; 155 | min-height: 100px; 156 | } 157 | 158 | .timeline>li .timeline-panel { 159 | float: left; 160 | width: 41%; 161 | padding: 0 20px 20px 30px; 162 | text-align: right; 163 | } 164 | 165 | .timeline>li .timeline-image { 166 | left: 50%; 167 | width: 100px; 168 | height: 100px; 169 | margin-left: -50px; 170 | border-width: 7px; 171 | } 172 | 173 | .timeline>li.timeline-inverted>.timeline-panel { 174 | float: right; 175 | padding: 0 30px 20px 20px; 176 | text-align: left; 177 | } 178 | } 179 | 180 | @media(min-width:992px) { 181 | .timeline>li { 182 | min-height: 150px; 183 | } 184 | 185 | .timeline>li .timeline-panel { 186 | padding: 0 20px 20px; 187 | } 188 | 189 | .timeline>li .timeline-image { 190 | width: 150px; 191 | height: 150px; 192 | margin-left: -75px; 193 | } 194 | 195 | .timeline>li.timeline-inverted>.timeline-panel { 196 | padding: 0 20px 20px; 197 | } 198 | } 199 | 200 | @media(min-width:1200px) { 201 | .timeline>li { 202 | min-height: 170px; 203 | } 204 | 205 | .timeline>li .timeline-panel { 206 | padding: 0 20px 20px 100px; 207 | } 208 | 209 | .timeline>li .timeline-image { 210 | width: 170px; 211 | height: 170px; 212 | margin-left: -85px; 213 | } 214 | 215 | .timeline>li .timeline-image h4 { 216 | margin-top: 40px; 217 | } 218 | 219 | .timeline>li.timeline-inverted>.timeline-panel { 220 | padding: 0 100px 20px 20px; 221 | } 222 | } 223 | -------------------------------------------------------------------------------- /assets/css/index.scss: -------------------------------------------------------------------------------- 1 | --- 2 | redirect_to: false 3 | --- 4 | 5 | @import "@primer/css/index.scss"; 6 | 7 | @import "timeline"; 8 | @import "curriculum"; 9 | @import "github_contribution_graph"; 10 | 11 | details.flash { 12 | ol, ul { 13 | padding-left: $spacer-4; 14 | margin-bottom: $spacer-2; 15 | } 16 | img { max-width: 100%; } 17 | 18 | &[open] { box-shadow: 0 0 0 0.2em rgba(3,102,214,0.3); } 19 | } 20 | 21 | .bg-blue-dark { 22 | background-color: var(--color-scale-blue-6) !important; 23 | } 24 | 25 | .bg-blue-darker { 26 | background-color: var(--color-scale-blue-7) !important; 27 | } 28 | 29 | .octicon { fill: currentColor; } 30 | 31 | .site-header { 32 | padding-top: 2px; 33 | padding-bottom: 2px; 34 | 35 | .site-header-menu { 36 | li { 37 | border-bottom: 1px solid var(--color-border-tertiary); 38 | 39 | @include breakpoint(md) { 40 | border-bottom: none; 41 | } 42 | } 43 | } 44 | 45 | .octicon-mark-github { 46 | width: 2em; 47 | height: 2em; 48 | } 49 | } 50 | 51 | .markdown-body { 52 | font-size: 16px; 53 | 54 | h1, h2, h3, h4, h5, h6 { 55 | -webkit-font-smoothing: antialiased; 56 | font-family: $font-mktg; 57 | } 58 | 59 | @mixin h1-mktg { 60 | font-size: $h1-size-mobile !important; 61 | @include breakpoint(md) { font-size: $h1-size !important; } 62 | } 63 | 64 | h1 { @include h1-mktg; } 65 | 66 | @mixin h2-mktg { 67 | font-size: $h2-size-mobile !important; 68 | @include breakpoint(md) { font-size: $h2-size !important; } 69 | } 70 | 71 | h2 { 72 | @include h2-mktg; 73 | margin-top: $spacer-6; 74 | margin-bottom: $spacer-3; 75 | line-height: 1.25; 76 | border: 0; 77 | vertical-align: middle; 78 | 79 | code { 80 | font-size: 0.8em; 81 | } 82 | } 83 | 84 | @mixin h3-mktg { 85 | font-size: $h3-size-mobile !important; 86 | @include breakpoint(md) { font-size: $h3-size !important; } 87 | } 88 | 89 | h3 { 90 | @include h3-mktg; 91 | margin-top: $spacer-4; 92 | margin-bottom: $spacer-3; 93 | 94 | @include breakpoint(md) { 95 | margin-top: $spacer-5; 96 | } 97 | } 98 | } 99 | 100 | .emoji { 101 | width: 1em; 102 | height: 1em; 103 | } 104 | 105 | .js-site-header.open { 106 | .site-header-menu { display: block; } 107 | } 108 | 109 | .site-header-menu { 110 | @media (max-width: $width-md) { 111 | display: none; 112 | padding-top: $spacer-2; 113 | clear: left; 114 | } 115 | } 116 | 117 | .site-header-toggle { 118 | display: none; 119 | 120 | svg { 121 | width: 18px; 122 | height: 24px; 123 | } 124 | 125 | @media (max-width: $width-md) { 126 | display: flex; 127 | color: var(--color-scale-gray-4); 128 | 129 | &:hover { 130 | color: var(--color-scale-gray-3); 131 | } 132 | } 133 | } 134 | 135 | .site-content { 136 | flex: 1 0 auto; 137 | } 138 | 139 | .flex-none { flex: none !important; } 140 | 141 | .card.hover-card { 142 | transition: box-shadow 0.2s ease-in-out; 143 | 144 | &:hover { 145 | box-shadow: var(--color-shadow-large); 146 | text-decoration: none; 147 | } 148 | } 149 | 150 | .resources svg { 151 | width: 64px; 152 | height: 64px; 153 | path { fill: currentColor !important; } 154 | } 155 | -------------------------------------------------------------------------------- /assets/css/page.scss: -------------------------------------------------------------------------------- 1 | @import "vendor/bootstrap-sass/lib/bootstrap.scss"; 2 | 3 | /* Color Definitions */ 4 | $color-dark: #1875c6; 5 | $color-bright: #00a5ea; 6 | $mono-dark: #222222; 7 | $mono-light: #f3f3f3; 8 | $mono-medium: #5a5a5a; 9 | $mono-bright: #ffffff; 10 | 11 | // 12 | table{ 13 | @extend .table; 14 | @extend .table-striped; 15 | @extend .table-bordered; 16 | } 17 | 18 | iframe[src^="//player.vimeo"]{ 19 | width: 100%; 20 | } 21 | 22 | .jumbotron{ 23 | &.classes{ 24 | a{ 25 | text-decoration: none; 26 | 27 | .panel{ 28 | background: none; 29 | box-shadow: none; 30 | margin: 1em; 31 | padding: 1em; 32 | opacity: .9; 33 | } 34 | 35 | &:hover{ 36 | .panel{ 37 | color: $mono-bright; 38 | opacity: 1; 39 | } 40 | } 41 | 42 | .octicon{ 43 | font-size: 4em; 44 | } 45 | } 46 | } 47 | } 48 | 49 | 50 | header{ 51 | padding-top: 1em; 52 | margin-bottom: 1em; 53 | 54 | .navbar-default{ 55 | background: none !important; 56 | background-color: none !important; 57 | border: none !important; 58 | box-shadow: none !important; 59 | } 60 | .navbar-toggle{ 61 | background-color: $mono-light; 62 | 63 | .icon-bar{ 64 | background-color: $color-dark; 65 | } 66 | } 67 | 68 | .nav{ 69 | line-height: 50px; 70 | text-align: center; 71 | 72 | li{ 73 | a{ 74 | color: $mono-bright !important; 75 | margin-left: 1em; 76 | margin-right: 1em; 77 | text-decoration: none; 78 | opacity: .8; 79 | 80 | &:last-child{ 81 | margin-right: 0; 82 | } 83 | 84 | &:hover{ 85 | color: $mono-bright; 86 | text-decoration: none; 87 | opacity: 1; 88 | background-color: none !important; 89 | background: none !important; 90 | } 91 | 92 | &.active{ 93 | opacity: 1; 94 | } 95 | } 96 | } 97 | } 98 | } 99 | 100 | .jumbotron{ 101 | background-color: $mono-light !important; 102 | 103 | &.colorful{ 104 | background-color: $color-dark !important; 105 | } 106 | } 107 | 108 | .colorful{ 109 | background-color: $color-dark !important; 110 | color: $mono-bright; 111 | 112 | a{ 113 | color: $mono-bright; 114 | } 115 | } 116 | 117 | .testimonial{ 118 | blockquote{ 119 | border-left: 0; 120 | font-size: .8em; 121 | box-shadow: 0 0 0 1px $mono-light; 122 | background-color: $mono-light; 123 | border-radius: 3px; 124 | 125 | &:before{ 126 | content: ""; 127 | position: absolute; 128 | width: 0; 129 | height: 0; 130 | bottom: 0; 131 | border-left: 20px solid transparent; 132 | border-right: 10px solid transparent; 133 | border-top: 20px solid $mono-light; 134 | bottom: 20px; 135 | margin-left: 30%; 136 | } 137 | } 138 | 139 | .attribution{ 140 | text-align: center; 141 | font-size: .8em; 142 | } 143 | } 144 | 145 | .site-header-logo { 146 | @media (min-width: 768px) { 147 | float: left; 148 | } 149 | 150 | .logo { 151 | width: auto; 152 | height: 28px; 153 | overflow: visible !important; // overrides for descender characters to not get cut off by SVG frame. 154 | 155 | /* @include breakpoint($small) { 156 | height: 22px; 157 | opacity: 0.9; 158 | } 159 | */ 160 | &:hover { 161 | opacity: 1; 162 | } 163 | 164 | path, 165 | ellipse { 166 | fill: #000; 167 | } 168 | } 169 | } 170 | 171 | #logo{ 172 | 173 | a { 174 | display: block; 175 | height: 50px; 176 | width: 185px; 177 | text-indent: -999px; 178 | overflow: hidden; 179 | background: url('../../images/gh-training-logo-2x.png') no-repeat center center; 180 | background-size: contain; 181 | } 182 | } 183 | 184 | footer { 185 | border-top: solid 1px $mono-light; 186 | margin-top: 1em; 187 | padding-top: 1em; 188 | padding-bottom: 1em; 189 | font-size: .8em; 190 | 191 | .octicon-mark-github { 192 | position: absolute; 193 | left: 50%; 194 | color: #ccc; 195 | height: 24px; 196 | width: 24px; 197 | margin-left: -12px; 198 | font-size: 24px; 199 | line-height: 1; 200 | } 201 | 202 | ul{ 203 | list-style: none; 204 | margin: 0; 205 | padding: 0; 206 | 207 | li { 208 | display: inline-block; 209 | margin-left: 5px; 210 | } 211 | li:first-child { 212 | margin-left: 0; 213 | } 214 | } 215 | } 216 | 217 | .no-left-padding { 218 | padding-left: 0px !important; 219 | } 220 | -------------------------------------------------------------------------------- /assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/training-kit/a50017c8aaa942a9535b73bf55191c22bd8a60b3/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/training-kit/a50017c8aaa942a9535b73bf55191c22bd8a60b3/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/training-kit/a50017c8aaa942a9535b73bf55191c22bd8a60b3/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/training-kit/a50017c8aaa942a9535b73bf55191c22bd8a60b3/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/training-kit/a50017c8aaa942a9535b73bf55191c22bd8a60b3/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /downloads/az/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub-dan Git üçün yaddaş kitabçası 5 | byline: Git - kompüterinizdə GitHub ilə işləmək üçün istifadə olunan açıq mənbəli, versiyaların paylanmış nəzarət sistemidir. Bu kitabça, əmr sətri üçün əsas Git əmrləri və onların tətbiqi üzrə təlimatlardan ibarətdir. 6 | leadingpath: ../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Git quraşdırılması 11 | GitHub, repozitarla əsas əməliyyatların icra edilməsi üçün qrafik interfeysli bir pəncərə proqramı və genişləndirilmiş iş ssenariləri üçün Git-in avtomatik yenilənən konsol versiyasını təqdim edir. 12 | 13 | ### Github Desktop 14 | [desktop.github.com](https://desktop.github.com) 15 | 16 | Linux və POSIX sistemləri üçün Git distribusiyalarını Git SCM rəsmi saytında tapa bilərsiniz. 17 | 18 | ### Bütün platformalar üçün Git 19 | [git-scm.com](https://git-scm.com) 20 | 21 | ## İlkin quraşdırma 22 | İstifadəçi haqqında informasiyanın bütün lokal repozitarlar üçün konfiqurasiyası 23 | 24 | ```$ git config --global user.name "[istifadəçi adı]"``` 25 | 26 | Kommitlərinizdə müəllif sahəsində əks olunacaq adınızı təyin edir 27 | 28 | ```$ git config --global user.email "[e-poçt ünvanı]"``` 29 | 30 | Kommitlərinizin məlumat hissəsində əks olunacaq e-poçt ünvanınızı təyin edir 31 | 32 | ```$ git config --global color.ui auto``` 33 | 34 | Əmr sətrinin çıxışının faydalı rənglənməsini aktiv edir 35 | 36 | ## Budaqlar 37 | Budaqlar - Git-lə işin mühüm hissəsidir. Etdiyiniz istənilən kommit hal-hazırda "giriş etmiş" olduğunuz budaqda ediləcək. Hansı budaqda olduğunuzu görmək üçün `git status` əmrindən istifadə edin. 38 | 39 | ```$ git branch [budaq-adı]``` 40 | 41 | Yeni budaq yaradır 42 | 43 | ```$ git switch -c [budaq-adı]``` 44 | 45 | Göstərilən budağa keçir və iş qovluğunu yeniləyir 46 | 47 | ```$ git merge [budaq-adı]``` 48 | 49 | Göstərilən budağın tarixini cari budaqla birləşdirir. Bu, ümumiyyətlə dəyişikliklərin qəbul edilməsi sorğularında istifadə olunur, lakin vacib bir Git əməliyyatıdır. 50 | 51 | ```$ git branch -d [budaq-adı]``` 52 | 53 | Göstərilən budağı silir 54 | 55 | {% endcapture %} 56 |
57 | {{ colOne | markdownify }} 58 |
59 | 60 | 61 | {% capture colTwo %} 62 | 63 | ## Repozitarın yaradılması 64 | 65 | Yeni bir repozitar ilə işə başlamaq üçün, bunu ya lokalda yaradıb sonra GitHub-a göndərməli və ya mövcud repozitarı klonlaşdırmalısınız. Hər repozitar üçün bu əməliyyatı sadəcə bir dəfə edəcəksiz. 66 | 67 | ```$ git init``` 68 | 69 | Mövcud bir qovluğu Git repozitarına çevirir 70 | 71 | ```$ git clone [url]``` 72 | 73 | GitHub-da mövcud olan repozitarı, bütün faylları, budaqları və kommitləri daxil olmaqla klonlaşdırır (yükləyir). 74 | 75 | ## .gitignore faylı 76 | Bəzən, müəyyən faylları Git tərəfindən izlənmədən istisna etmək əlverişli ola bilər. Bu istisnalar adətən `.gitignore` adlanan xüsusi faylda yazılaraq təyin edilir. `.gitignore` faylları üçün faydalı şablonları [github.com/github/gitignore](https://github.com/github/gitignore) ünvanında tapa bilərsiniz. 77 | 78 | ## Dəyişikliklərin sinxronizasiyası 79 | 80 | Lokal repozitarınızı Github.com-da olan repozitarınız ilə sinxronlaşdırın 81 | 82 | ```$ git fetch``` 83 | 84 | GitHub-da mövcud olan repozitarın bütün tarixçəsini yükləyir 85 | 86 | ```$ git merge``` 87 | 88 | GitHub-da mövcud olan repozitarı cari budaqla birləşdirir 89 | 90 | ```$ git push``` 91 | 92 | Lokal budaqda olan bütün kommitləri Github repozitarına göndərir 93 | 94 | ```$ git pull``` 95 | 96 | Cari işlək lokal budağı müvafiq Github budağından gələn bütün yeni kommitlərlə yeniləyir. `git pull` - `git fetch` və `git merge` əmrlərinin kombinasiyasıdır 97 | 98 | {% endcapture %} 99 |
100 | {{ colTwo | markdownify }} 101 |
102 |
103 | 104 | {% capture colThree %} 105 | 106 | ## Dəyişikliklər edin 107 | Dəyişikliklərə baxış və kommitlərin yaradılması 108 | 109 | ```$ git status``` 110 | 111 | Bütün yeni və ya dəyişdirilmiş faylların siyahısını sadalayır 112 | 113 | ```$ git log``` 114 | 115 | Cari budaq üçün versiya tarixini siyahılayır 116 | 117 | ```$ git log --follow [fayl]``` 118 | 119 | Bir fayl üçün ad dəyişmələri də daxil olmaqla versiya tarixini siyahılayır 120 | 121 | ```$ git diff [birinci-budaq]...[ikinci-budaq]``` 122 | 123 | İki budaq arasındakı məzmun fərqlərini göstərir 124 | 125 | ```$ git show [commit]``` 126 | 127 | Müəyyən bir kommit üçün metadata və məzmun dəyişikliklərini göstərir 128 | 129 | ```$ git add [file]``` 130 | 131 | Göstərilən faylı sonrakı əməliyyatlar üçün indeksləyir 132 | 133 | ```$ git commit -m "[izahlı mesaj]"``` 134 | 135 | İndekslənmiş dəyişiklikləri versiya tarixinə yazır 136 | 137 | ## Kommitlərin geri qaytarılması 138 | 139 | Səhvlərin silinməsi və tarixin tənzimlənməsi 140 | 141 | ```$ git reset [kommit]``` 142 | 143 | Bütün dəyişiklikləri işçi qovluğunda saxlayaraq, göstərilən `[commit]`-dən sonrakı kommitlərin hamısını ləğv edir. 144 | 145 | ```$ git reset --hard [kommit]``` 146 | 147 | Bütün tarixi, işçi qovluğu daxil olmaqla ləğv edir və göstərilən kommitə qaytarır. 148 | 149 | > DİQQƏT! Tarixi dəyişdirmək xoşagəlməz yan təsirlərə səbəb ola bilər. GitHub-da mövcud olan kommitləri dəyişdirərkən ehtiyatlı olun. Əgər köməyə ehtiyacınız varsa, [github.community](https://github.community) və ya dəstəklə əlaqə saxlayın. 150 | 151 | {% endcapture %} 152 |
153 | {{ colThree | markdownify }} 154 |
155 | 156 | {% capture colFour %} 157 | 158 | ## Lüğət 159 | 160 | - **git**: açıq mənbəli, versiyaların paylanmış nəzarət sistemidir 161 | - **GitHub**: git repozitarlarına ev sahibliyi və əməkdaşlıq üçün platformadır 162 | - **commit**: bir Git obyekti, repozitarınızın SHA alqoritmi ilə sıxılmış bir görüntüsüdür 163 | - **branch** (budaq): kommitlər üçün yüngül daşına bilən bir göstəricidir 164 | - **clone**: bütün kommit və budaqları da daxil olmaqla bir repozitarın lokal bir versiyasıdır 165 | - **remote** (məsafədən idarə olunan): GitHub-da bütün komanda üzvlərinin istifadə etdikləri ümumi bir repozitardır 166 | - **fork** (nüsxə): GitHub-dakı fərqli istifadəçiyə məxsus bir repozitar nüsxəsidir 167 | - **pull request** (dəyişikliklərin qəbul edilməsi sorğusu): bir budaqda təqdim olunan fərqləri müqayisə və rəylər, şərhlər, inteqrasiya olunmuş testlər və s. ilə müzakirə etmək üçün bir yer 168 | - **HEAD**: cari işlədiyiniz qovluğu təmsil edir. HEAD göstəricisi `git switch` istifadə edilərkən müxtəlif budaqlara köçürülə bilər. 169 | 170 | {% endcapture %} 171 |
172 | {{ colFour | markdownify }} 173 |
174 |
175 | -------------------------------------------------------------------------------- /downloads/bn_BD/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: গিটহাব গিট চিট শীট 5 | byline: গিট হচ্ছে একটি ওপেন সোর্স ড্রিস্ট্রিবিউটেড ভার্শন কন্ট্রোল সিস্টেম যা আপনার ল্যাপটপ বা ডেস্কটপে গিটহাব সুবিধাদি প্রদান করে। এই চিট শীটে সাধারনভাবে ব্যবহৃত গিট কমান্ড লাইনের নির্দেশনা দেওয়া আছে । 6 | leadingpath: ../../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## ইন্সটল গিট 11 | গিটহাবের রিপোজিটরির সাধারন অ্যাকশন ও উন্নত পরিস্থিতিতে জন্য Git এর একটি স্বয়ংক্রিয়ভাবে আপডেট করার কমান্ড লাইন সংস্করণসহ ডেস্কটপের জন্য গ্রাফিকাল ইউজার ইন্টারফেস সুবিধাযুক্ত ক্লায়েন্ট আছে। 12 | 13 | ### উইন্ডোজের জন্য গিটহাব 14 | [windows.github.com](https://windows.github.com) 15 | 16 | ### ম্যাকের জন্য গিটহাব 17 | [mac.github.com](https://mac.github.com) 18 | 19 | লিনাক্স ও POSIX সিস্টেমের জন্য গিট অফিশিয়াল Git SCM ওয়েবসাইটে উপলব্ধ। 20 | 21 | ### সকল প্ল্যাটফরমের জন্য গিটহাব 22 | [git-scm.com](https://git-scm.com) 23 | 24 | ## টুল কনফিগার করা 25 | সকল লোকাল রিপোজিটরির জন্য টুল কনফিগার করা 26 | 27 | ```$ git config --global user.name "[name]"``` 28 | 29 | নাম ঠিক করুন যেটা আপনি কমিট ট্রান্সেকশনের সাথে সংযুক্ত করতে চান। 30 | 31 | 32 | ```$ git config --global user.email "[email address]"``` 33 | 34 | ইমেইল ঠিক করুন যেটা আপনি কমিট ট্রান্সেকশনের সাথে সংযুক্ত করতে চান। 35 | 36 | 37 | ## রিপোজিটরি তৈরি করা 38 | একটি নতুন রিপোসিটোরি শুরু অথবা একটি বিদ্যমান URL থেকে শুরু করুন। 39 | 40 | 41 | ```$ git init [project-name]``` 42 | 43 | নির্দিষ্ট নাম দিয়ে একটি নতুন রিপোসিটোরি তৈরি করুন। 44 | 45 | 46 | ```$ git clone [url]``` 47 | 48 | একটি প্রকল্প এবং তার সম্পূর্ণ সংস্করণ ইতিহাস ডাউনলোড করুন। 49 | 50 | {% endcapture %} 51 |
52 | {{ colOne | markdownify }} 53 |
54 | 55 | 56 | {% capture colTwo %} 57 | 58 | ## পরিবর্তন করা 59 | সম্পাদনা পর্যালোচনা করুন এবং একটি কমিট ট্রান্সেকসন ক্রাফট করুন। 60 | 61 | 62 | ```$ git status``` 63 | 64 | সকল ফাইল লিস্ট করুন যা কমিট করা হবে। 65 | 66 | 67 | ```$ git diff``` 68 | 69 | ফাইলগুলোর পার্থক্য দেখুন যেগুলো এখনো staged হয়নি। 70 | 71 | 72 | ```$ git add [file]``` 73 | 74 | সংস্করনের জন্য প্রস্তুতি ফাইল স্ন্যাপশট করুন। 75 | 76 | 77 | ```$ git diff --staged``` 78 | 79 | staging এবং last file version এরমধ্যে পার্থক্য দেখুন। 80 | 81 | 82 | ```$ git reset [file]``` 83 | 84 | ফাইল Unstages, কিন্তু তার বিষয়বস্তু অপরিবর্তিত রাখুন। 85 | 86 | 87 | ```$ git commit -m"[descriptive message]"``` 88 | 89 | ফাইলের স্ন্যাপশট ভার্শনের ইতিহাসে সংরক্ষন করুন। 90 | 91 | ## গ্রুপ পরিবর্তন 92 | Name a series of commits and combine completed efforts 93 | 94 | 95 | ```$ git branch``` 96 | 97 | বর্তমান রিপোসিটোরির মধ্যে সব লোকাল ব্রাঞ্চ তালিকাভুক্ত করুন। 98 | 99 | 100 | ```$ git branch [branch-name]``` 101 | 102 | একটি নতুন ব্রাঞ্চ তৈরি করুন 103 | 104 | 105 | ```$ git switch -c [branch-name]``` 106 | 107 | নির্দিষ্ট শাখায় সুইচ এবং আপডেট ওয়ার্কিং ডিরেক্টরি 108 | 109 | 110 | ```$ git merge [branch-name]``` 111 | 112 | বর্তমান শাখায় নির্দিষ্ট শাখার ইতিহাস একত্রিত করুন 113 | 114 | 115 | ```$ git branch -d [branch-name]``` 116 | 117 | নির্দিষ্ট শাখা মুছে ফেলে 118 | {% endcapture %} 119 |
120 | {{ colTwo | markdownify }} 121 |
122 |
123 | 124 | 125 | {% capture colThree %} 126 | ## ফাইলের নাম পরিবর্তন (Refactor) করুন 127 | versioned ফাইল নতুন স্থানে স্থাপন বা মুছে ফেলুন 128 | 129 | 130 | ```$ git rm [file]``` 131 | 132 | ওয়ার্কিং ডিরেক্টরি থেকে ফাইল মুছে এবং মুছে ফেলার পর্যায়ে 133 | 134 | 135 | ```$ git rm --cached [file]``` 136 | 137 | ভার্সন নিয়ন্ত্রণ থেকে ফাইল মুছে ফেলা কিন্তু স্থানীয়ভাবে ফাইল সংরক্ষন করা 138 | 139 | 140 | ```$ git mv [file-original] [file-renamed]``` 141 | 142 | ফাইলের নাম পরিবর্তন করা এবং কমিট জন্য এটি প্রস্তুত করুন 143 | 144 | ## ট্র্যাকিং দমন 145 | অস্থায়ী ফাইল এবং পাথ বাদ দিন 146 | 147 | ``` 148 | *.log 149 | build/ 150 | temp-* 151 | ``` 152 | 153 | `.gitignore` নামের একটি পাঠ্য ফাইল নির্দিষ্ট প্যাটার্নের সাথে মিলে যাওয়া ফাইল এবং পাথগুলির দুর্ঘটনাজনিত সংস্করণকে দমন করে 154 | 155 | 156 | ```$ git ls-files --others --ignored --exclude-standard``` 157 | 158 | এই প্রকল্পে সব উপেক্ষিত ফাইলের তালিকা তৈরি করুন 159 | 160 | ## ফ্রাগমেন্টস সংরক্ষন 161 | অসম্পূর্ণ পরিবর্তন পুনরুদ্ধার এবং সরাইয়া রাখা 162 | 163 | 164 | ```$ git stash``` 165 | 166 | সাময়িকভাবে সব পরিবর্তিত ট্র্যাক ফাইল স্টোর করা 167 | 168 | 169 | ```$ git stash pop``` 170 | 171 | সাম্প্রতিক stashed ফাইল রিস্টোর করা 172 | 173 | 174 | ```$ git stash list``` 175 | 176 | সব stashed changesets ফাইলের তালিকা তৈরি করুন 177 | 178 | 179 | ```$ git stash drop``` 180 | 181 | সাম্প্রতিক stashed changeset ফাইল বর্জন করুন 182 | {% endcapture %} 183 |
184 | {{ colThree | markdownify }} 185 |
186 | 187 | {% capture colFour %} 188 | ## হিস্টোরি রিভিউ 189 | ব্রাউজ করুন এবং প্রকল্পের ফাইল এর বিবর্তন পরিদর্শন করুন 190 | 191 | 192 | ```$ git log``` 193 | 194 | বর্তমান শাখার জন্য ভার্সন ইতিহাসের তালিকা তৈরি করুন 195 | 196 | 197 | ```$ git log --follow [file]``` 198 | 199 | বর্তমান শাখার জন্য ভার্সন ইতিহাসের তালিকা তৈরি করুন, renames সহ 200 | 201 | 202 | ```$ git diff [first-branch]...[second-branch]``` 203 | 204 | দুই শাখার মধ্যে বিষয়বস্তুর পার্থক্য দেখুন 205 | 206 | 207 | ```$ git show [commit]``` 208 | 209 | নির্দিষ্ট আউটপুট মেটাডেটা এবং বিষয়বস্তু পরিবর্তন কমিট করুন 210 | 211 | ## কমিট রিডো করা 212 | ভুল এবংক্রাফট প্রতিস্থাপনের ইতিহাস মুছুন 213 | 214 | 215 | ```$ git reset [commit]``` 216 | 217 | Undoes all commits after `[commit]`, preserving changes locally 218 | 219 | 220 | ```$ git reset --hard [commit]``` 221 | 222 | সব ইতিহাস এবং করা পরিবর্তনগুলি ফিরে নির্দিষ্ট কমিটে অস্বীকার করুন 223 | 224 | ## সিঙ্ক্রোনাইজড পরিবর্তনগুলি 225 | একটি দূরবর্তী (URL) নিবন্ধন করুন এবং রিপোসিটোরি ইতিহাস এক্সচেঞ্জ করুন 226 | 227 | 228 | ```$ git fetch [remote]``` 229 | 230 | দূরবর্তী রিপোসিটোরি থেকে সব ইতিহাস ডাউনলোড করুন 231 | 232 | 233 | ```$ git merge [remote]/[branch]``` 234 | 235 | বর্তমান স্থানীয় শাখা ও দূরবর্তী শাখা একত্রিত করুন 236 | 237 | 238 | ```$ git push [remote] [branch]``` 239 | 240 | সকল লোকাল ব্রাঞ্চ কমিট গিটহাবে আপলোড করুন 241 | 242 | 243 | ```$ git pull``` 244 | 245 | বুকমার্ক হিস্টোরি ও অন্তর্ভুক্ত পরিবর্তনগুলো ডাউনলোড করুন 246 | {% endcapture %} 247 |
248 | {{ colFour | markdownify }} 249 |
250 | -------------------------------------------------------------------------------- /downloads/es_ES/github-git-cheat-sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/training-kit/a50017c8aaa942a9535b73bf55191c22bd8a60b3/downloads/es_ES/github-git-cheat-sheet.pdf -------------------------------------------------------------------------------- /downloads/fr/github-git-cheat-sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/training-kit/a50017c8aaa942a9535b73bf55191c22bd8a60b3/downloads/fr/github-git-cheat-sheet.pdf -------------------------------------------------------------------------------- /downloads/github-bash-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Bash Cheat Sheet 5 | byline: Bash is the GNU Project's shell. Bash is the Bourne Again SHell. Bash is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh). It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. It offers functional improvements over sh for both programming and interactive use. In addition, most sh scripts can be run by Bash without modification. 6 | leadingpath: ../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Install Bash 11 | Bash is typically a native application on Linux/Unix based machines; however, if installation is necessary you can find links to downloads below. 12 | 13 | ### Bash for Windows 14 | Because bash isn't native to Windows an application like Cygwin would be necessary to 15 | gain the same features readily available in linux/macOS. 16 | https://www.cygwin.com 17 | 18 | ### Bash for macOS and linux 19 | Bash is natively installed on Linux/Unix based machines. 20 | 21 | ## Configure shell 22 | Configuring bash aliases 23 | 24 | ```$ alias ls='ls -lGh'``` 25 | 26 | Sets the ls command to list, colorize, and provide file size suffixes 27 | 28 | ## Working with directories 29 | Navigate, create, and delete directory folders and files 30 | 31 | ```$ pwd``` 32 | 33 | Display path of current working directory 34 | 35 | ```$ cd [directory]``` 36 | 37 | Change working directory to [directory] 38 | 39 | ```$ cd ..``` 40 | 41 | Navigate to the parent directory 42 | 43 | ```$ ls``` 44 | 45 | List directory contents 46 | 47 | ```$ ls -la``` 48 | 49 | List detailed directory contents, including hidden files 50 | 51 | 52 | ```$ mkdir [directory]``` 53 | 54 | Create a new directory named [directory] 55 | 56 | {% endcapture %} 57 |
58 | {{ colOne | markdownify }} 59 |
60 | 61 | {% capture colTwo %} 62 | 63 | ## Handling output 64 | Control the flow of data from a file 65 | 66 | ```$ cat [file]``` 67 | 68 | Output the contents of [file] 69 | 70 | 71 | ```$ less [file]``` 72 | 73 | Output the contents of [file] which supports pagination 74 | 75 | 76 | ```$ head [file]``` 77 | 78 | Output the first 10 lines of [file] 79 | 80 | 81 | ```$ [cmd] > [file] ``` 82 | 83 | Direct the output of [cmd] into [file] 84 | 85 | 86 | ```$ [cmd] >> [file]``` 87 | 88 | Append the output of [cmd] to [file] 89 | 90 | 91 | ```$ [cmd1] | [cmd2]``` 92 | 93 | Direct the output of [cmd1] to the input of [cmd2] 94 | 95 | 96 | ```$ clear``` 97 | 98 | Clear the bash window 99 | 100 | ## Working with files 101 | Moving, renaming, creating and deleting files 102 | 103 | ```$ rm [file]``` 104 | 105 | Delete [file] 106 | 107 | 108 | ```$ rm -r [directory]``` 109 | 110 | Delete [directory] 111 | 112 | ```$ rm -f [file]``` 113 | 114 | Force-delete [file] (add -r to force-delete a directory) 115 | 116 | 117 | ```$ mv [file-old] [file-new]``` 118 | 119 | Rename [file-old] to [file-new] 120 | 121 | 122 | ```$ cp [file] [directory]``` 123 | 124 | Copy [file] to [directory] (possibly overwriting an existing file) 125 | 126 | 127 | ```$ cp -r [src-directory] [dest-directory]``` 128 | 129 | Copy [src-directory] and it's contents to [dest-directory] (possibly overwriting files in an existing directory) 130 | 131 | ```$ touch [file]``` 132 | 133 | Update file access and modification time (and create [file] if it does not exist) 134 | 135 | {% endcapture %} 136 |
137 | {{ colTwo | markdownify }} 138 |
139 |
140 | 141 | 142 | {% capture colThree %} 143 | ## File and folder permissions 144 | Change read, write, and execute permissions on files and folders 145 | 146 | 147 | ```$ chmod 755 [file]``` 148 | 149 | Change permissions of [file] to 755 150 | 151 | > Octal representation of permissions are group of permissions for User (u), Group (g) and Others (o) with values that are sum of read (4), write (2) and execute (1) permissions. For example, 755 is: 152 | > - Owner = 7; read (4) + write (2) + execute (1) 153 | > - Group = 5; read (4) + execute (1) 154 | > - Others = 5; read (4) + execute (1) 155 | 156 | 157 | 158 | ```$ chmod -R 600``` 159 | 160 | Change permissions of [directory] (and its contents to 600) 161 | 162 | 163 | ```$ chown [user]:[group] [file]``` 164 | 165 | Change ownership of [tile] to [user] and [group] (add -R to include a directory's contents) 166 | 167 | ## Networking and Internet 168 | ```$ ping [ip/host]``` 169 | 170 | Ping the [ip/host] and displays time, among other things 171 | 172 | ```$ curl -O [url]``` 173 | 174 | Downloads [url] to current working directory 175 | 176 | ```$ ssh [user]@[ip/host]``` 177 | 178 | Starts an SSH connection to [host] using [user] 179 | 180 | ```$ ssh-copy-id [user]@[host]``` 181 | 182 | Adds your SSH key to the host file for [user] to enable a keyed or passwordless login 183 | 184 | ```$ scp [file] [user]@[ip/host]:/path/to/file``` 185 | 186 | Securely copies [file] to a remote [host] 187 | 188 | ```$ wget [file]``` 189 | 190 | Downloads [file] to your current working directory 191 | 192 | ## System Tasks 193 | 194 | Find important information related to your currently running system 195 | 196 | ```$ ps ax``` 197 | 198 | List currently running processes 199 | 200 | ```$ top``` 201 | 202 | Displays live information on your currently running processes 203 | 204 | ```$ kill [pid]``` 205 | 206 | Ends the process using the provided process ID [pid] 207 | 208 | ```$ killall [processname]``` 209 | 210 | Ends all processes with the given [processname] 211 | 212 | ```$ df``` 213 | 214 | Shows disk usage 215 | 216 | ```$ du [filename]``` 217 | 218 | Shows disk usage of all files and folders in [filename] 219 | 220 | {% endcapture %} 221 |
222 | {{ colThree | markdownify }} 223 |
224 | -------------------------------------------------------------------------------- /downloads/github-git-advanced-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | # Advanced Cheat Sheet 2 | 3 | 4 | ## Merge commands 5 | 6 | Abort the merge 7 | 8 | `$ git merge --abort` 9 | 10 | ## Stash commands 11 | 12 | Save current changes to a stash with a particular name 13 | 14 | `$ git stash save ` 15 | 16 | Save current changes to a stash (saves it as stash@{0}) 17 | 18 | `$ git stash` 19 | 20 | Drop the stash at the top of the stack 21 | 22 | `$ git stash drop` 23 | 24 | Drop the stash at the nth index 25 | 26 | `$ git stash drop stash@{n}` 27 | 28 | Apply the stash at the nth index and delete from the list 29 | 30 | `$ git stash pop stash@{n}` 31 | 32 | Apply the stash at the nth index 33 | 34 | `$ git stash apply stash@{n}` 35 | 36 | 37 | ## Checkout commands 38 | 39 | Discards all the changes 40 | 41 | `$ git restore .` 42 | 43 | Create a new branch and switch to that branch 44 | 45 | `$ git switch -c ` 46 | 47 | Bring a single file to the working space from the stash 48 | 49 | `$ git restore --source= ` 50 | 51 | ## Patch commands 52 | 53 | Apply a patch file (.diff or .patch) to the repo 54 | 55 | `$ git apply ` 56 | 57 | ## Log commands 58 | 59 | Prettify the log history of git 60 | 61 | `$ git log --pretty=oneline` 62 | -------------------------------------------------------------------------------- /downloads/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Git Cheat Sheet 5 | byline: Git is the open source distributed version control system that facilitates GitHub activities on your laptop or desktop. This cheat sheet summarizes commonly used Git command line instructions for quick reference. 6 | leadingpath: ../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Install 11 | 12 | ### GitHub Desktop 13 | [desktop.github.com](https://desktop.github.com) 14 | 15 | ### Git for All Platforms 16 | [git-scm.com](https://git-scm.com) 17 | 18 | ## Configure tooling 19 | Configure user information for all local repositories 20 | 21 | ```$ git config --global user.name "[name]"``` 22 | 23 | Sets the name you want attached to your commit transactions 24 | 25 | ```$ git config --global user.email "[email address]"``` 26 | 27 | Sets the email you want attached to your commit transactions 28 | 29 | ```$ git config --global color.ui auto``` 30 | 31 | Enables helpful colorization of command line output 32 | 33 | ## Branches 34 | 35 | Branches are an important part of working with Git. Any commits you make will be made on the branch you're currently "checked out" to. Use `git status` to see which branch that is. 36 | 37 | ```$ git branch [branch-name]``` 38 | 39 | Creates a new branch 40 | 41 | ```$ git switch -c [branch-name]``` 42 | 43 | Switches to the specified branch and updates the working directory 44 | 45 | ```$ git merge [branch]``` 46 | 47 | Combines the specified branch's history into the current branch. This is usually done in pull requests, but is an important Git operation. 48 | 49 | ```$ git branch -d [branch-name]``` 50 | 51 | Deletes the specified branch 52 | 53 | {% endcapture %} 54 |
55 | {{ colOne | markdownify }} 56 |
57 | 58 | 59 | {% capture colTwo %} 60 | 61 | ## Create repositories 62 | 63 | A new repository can either be created locally, or an existing repository can be cloned. When a repository was initialized locally, you have to push it to GitHub afterwards. 64 | 65 | ```$ git init``` 66 | 67 | The git init command turns an existing directory into a new Git repository inside the folder you are running this command. After using the `git init` command, link the local repository to an empty GitHub repository using the following command: 68 | 69 | ```$ git remote add origin [url]``` 70 | 71 | Specifies the remote repository for your local repository. The url points to a repository on GitHub. 72 | 73 | ```$ git clone [url]``` 74 | 75 | Clone (download) a repository that already exists on GitHub, including all of the files, branches, and commits 76 | 77 | ## The .gitignore file 78 | 79 | Sometimes it may be a good idea to exclude files from being tracked with Git. This is typically done in a special file named `.gitignore`. You can find helpful templates for `.gitignore` files at [github.com/github/gitignore](https://github.com/github/gitignore). 80 | 81 | ## Synchronize changes 82 | 83 | Synchronize your local repository with the remote repository on GitHub.com 84 | 85 | ```$ git fetch``` 86 | 87 | Downloads all history from the remote tracking branches 88 | 89 | ```$ git merge``` 90 | 91 | Combines remote tracking branches into current local branch 92 | 93 | ```$ git push``` 94 | 95 | Uploads all local branch commits to GitHub 96 | 97 | ```$ git pull``` 98 | 99 | Updates your current local working branch with all new commits from the corresponding remote branch on GitHub. `git pull` is a combination of `git fetch` and `git merge` 100 | 101 | {% endcapture %} 102 |
103 | {{ colTwo | markdownify }} 104 |
105 |
106 | 107 | {% capture colThree %} 108 | 109 | ## Make changes 110 | 111 | Browse and inspect the evolution of project files 112 | 113 | ```$ git log``` 114 | 115 | Lists version history for the current branch 116 | 117 | ```$ git log --follow [file]``` 118 | 119 | Lists version history for a file, beyond renames (works only for a single file) 120 | 121 | ```$ git diff [first-branch]...[second-branch]``` 122 | 123 | Shows content differences between two branches 124 | 125 | ```$ git show [commit]``` 126 | 127 | Outputs metadata and content changes of the specified commit 128 | 129 | ```$ git add [file]``` 130 | 131 | Snapshots the file in preparation for versioning 132 | 133 | ```$ git commit -m "[descriptive message]"``` 134 | 135 | Records file snapshots permanently in version history 136 | 137 | ## Redo commits 138 | 139 | Erase mistakes and craft replacement history 140 | 141 | ```$ git reset [commit]``` 142 | 143 | Undoes all commits after `[commit]`, preserving changes locally 144 | 145 | ```$ git reset --hard [commit]``` 146 | 147 | Discards all history and changes back to the specified commit 148 | 149 | > CAUTION! Changing history can have nasty side effects. If you need to change commits that exist on GitHub (the remote), proceed with caution. If you need help, reach out at [github.community](https://github.community) or contact support. 150 | 151 | {% endcapture %} 152 |
153 | {{ colThree | markdownify }} 154 |
155 | 156 | {% capture colFour %} 157 | 158 | ## Glossary 159 | 160 | - **git**: an open source, distributed version-control system 161 | - **GitHub**: a platform for hosting and collaborating on Git repositories 162 | - **commit**: a Git object, a snapshot of your entire repository compressed into a SHA 163 | - **branch**: a lightweight movable pointer to a commit 164 | - **clone**: a local version of a repository, including all commits and branches 165 | - **remote**: a common repository on GitHub that all team members use to exchange their changes 166 | - **fork**: a copy of a repository on GitHub owned by a different user 167 | - **pull request**: a place to compare and discuss the differences introduced on a branch with reviews, comments, integrated tests, and more 168 | - **HEAD**: representing your current working directory, the HEAD pointer can be moved to different branches, tags, or commits when using `git switch` 169 | 170 | {% endcapture %} 171 |
172 | {{ colFour | markdownify }} 173 |
174 |
175 | -------------------------------------------------------------------------------- /downloads/github-git-cheat-sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/training-kit/a50017c8aaa942a9535b73bf55191c22bd8a60b3/downloads/github-git-cheat-sheet.pdf -------------------------------------------------------------------------------- /downloads/github-git-concepts_BETA.md: -------------------------------------------------------------------------------- 1 | # GitHub Repository Fundamentals 2 | 3 | Git is an open source, distributed version control system founded in command line interaction. This guide provides the day-to-day setup and commands to use Git locally and connect repositories to GitHub for a complete collaboration workflow. 4 | 5 | ## Understanding terms & Processes descriptions of GitHub and Git 6 | 7 | With a language all its own, this quick guide to common terms of GitHub and Git will have you collaborating in no time. 8 | 9 | ### Repository 10 | 11 | A repository is the most basic element of Git and GitHub. Imagine it as a project's folder. A repository contains all of the project files (including documentation), and stores each file's revision history. 12 | 13 | ### Commit 14 | 15 | An individual change to a file (or set of files). With Git, every time you save it creates a unique ID (a.k.a. the "SHA" or "hash") that allows you to keep record of what changes were made when and by who. Commits usually contain a commit message which is a brief description the changes made. 16 | 17 | ### Branch 18 | 19 | A parallel version of repository. It is contained within the repository, but does not affect the main branch, allowing you to work freely without disrupting the "live" version. 20 | 21 | ### Remote 22 | 23 | The connection of a local repository with one on GitHub. It permits revision history to be synchronized by publishing local commits and downloading any new changes from GitHub. 24 | 25 | ### Pull Request 26 | 27 | A feature on GitHub which provides conversation, line-by-line code review, change history analysis, and summaries of modified files. 28 | 29 | ## Configuring 30 | 31 | The first thing to setup when using Git is two important fields about the user. This allows appropriate credit and traceability for project contributions. 32 | 33 | ``` 34 | git config --global user.name "Mona Lisa Octocat" 35 | git config --global user.email "mona@github.com" 36 | ``` 37 | 38 | ## Versioning Files 39 | 40 | Versioning files begins by creating a repository on your GitHub account. File authoring and editing can be performed through the web interface or by acquiring the repository locally from the command line. 41 | 42 | ``` 43 | git clone [url] [project-name] 44 | cd [project-name] 45 | ``` 46 | 47 | Repository contributions are commonly made through branches and commits focused on small pieces of work. 48 | 49 | ``` 50 | git branch [name] 51 | git switch [name] 52 | git add [file] 53 | git commit -m [commit message] 54 | ``` 55 | 56 | When the feature work reaches completion, the branch can be merged locally or pushed to GitHub for code review. 57 | 58 | ``` 59 | git switch main 60 | git merge [branch] 61 | 62 | git push -u origin [branch] 63 | ``` 64 | 65 | As commits can be efficiently made, the state of any new, modified, or missing files can be verified and quickly validated. 66 | 67 | ``` 68 | git status 69 | git diff [modified-file] 70 | ``` 71 | 72 | ## Integrating Changes 73 | 74 | Commits can be made against any branch and in any order. Commonly, this is performed against the main branch as means of feature or bug-fix integration. 75 | 76 | ``` 77 | git switch main 78 | git merge feature-enhancement 79 | git branch -d feature-enhancement 80 | ``` 81 | 82 | [PLACEHOLDER - Recursive Merge Diagram] 83 | 84 | The last step deletes the branch. Merges result in all commit history becoming traversible, and eliminating the need for the branch label to remain. 85 | 86 | ## Sharing & Retrieving 87 | 88 | Sharing commit history requires only a destination repository, one on GitHub, and a single setup step. 89 | 90 | ``` 91 | git remote add origin [repo-url] 92 | git remote -v 93 | ``` 94 | 95 | [PLACEHOLDER - Local-Upstream Diagram] 96 | 97 | With a remote setup, and the traditional name of "origin" aliased to the URL, publishing local commits is simple. 98 | 99 | ``` 100 | git push origin [branch-name] 101 | ``` 102 | 103 | Retrieving changes from a shared repository and automatically merging in any new commits locally is performed in a multi-step operation run by one command. 104 | 105 | ``` 106 | git switch [target-branch] 107 | git pull origin [upstream-branch] 108 | ``` 109 | -------------------------------------------------------------------------------- /downloads/gu/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Git Cheat Sheet 5 | byline: Git is the open source distributed version control system that facilitates GitHub activities on your laptop or desktop. This cheat sheet summarizes commonly used Git command line instructions for quick reference. 6 | leadingpath: ../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Git સ્થાપિત કરો 11 | GitHub ડેસ્કટોપ ક્લાયંટ પ્રદાન કરે છે, जસૌથી સામાન્ય રીપોઝીટરી કાર્યો માટે ગ્રાફિકલ યુઝર ઈન્ટરફેસ સમાવે (GUI) છે અને અદ્યતન દૃશ્ય માટે Git નું આપમેળે જનરેટ થયેલ આદેશ વાક્ય સંસ્કરણ. 12 | 13 | ### GitHub Desktop 14 | [desktop.github.com](https://desktop.github.com) 15 | 16 | Linux અથવા POSIX સિસ્ટમ માટે Git ડિલિવરી આધિકારીક Git SCM વેબસાઇટ પરથી ઉપલબ્ધ છે. 17 | 18 | ### Git બધા પ્લેટફોર્મ માટે 19 | [git-scm.com](https://git-scm.com) 20 | 21 | ## ઉપકરણ સેટિંગ્સ 22 | તમામ સ્થાનિક રીપોઝીટરીઝ માટે વપરાશકર્તા માહિતી રૂપરેખાંકિત કરો 23 | 24 | ```$ git config --global user.name "[name]"``` 25 | 26 | તમે તમારા પ્રતિબદ્ધ વ્યવહાર સાથે સાંકળવા માંગો છો તે નામ સેટ કરો 27 | 28 | 29 | ```$ git config --global user.email "[email address]"``` 30 | 31 | તમે તમારા પ્રતિબદ્ધ વ્યવહાર સાથે સાંકળવા માંગો છો તે ઇમેઇલ સેટ કરો 32 | 33 | 34 | ## રિપોઝીટરી બનાવો 35 | 36 | નવી રિપોઝીટરી શરૂ કરો અથવા કોઈપણ વર્તમાન URL પાસેથી મેળવો 37 | 38 | 39 | ```$ git init [project-name]``` 40 | 41 | ઉલ્લેખિત નામ સાથે સ્થાનિક રિપોઝીટરી બનાવો 42 | 43 | 44 | ```$ git clone [url]``` 45 | 46 | પ્રોજેક્ટ અને તમામ સંસ્કરણ ઇતિહાસ ડાઉનલોડ કરો 47 | 48 | {% endcapture %} 49 |
50 | {{ colOne | markdownify }} 51 |
52 | 53 | 54 | {% capture colTwo %} 55 | 56 | ## ફેરફારો કરો 57 | સંપાદનો અને હસ્તકલા પ્રતિબદ્ધ વ્યવહારોની સમીક્ષા કરો 58 | 59 | 60 | ```$ git status``` 61 | 62 | પ્રતિબદ્ધ થવા માટે નવી અને બદલાયેલી ફાઇલોની સૂચિ જુઓ 63 | 64 | 65 | ```$ git diff``` 66 | 67 | ફાઈલો માટે તફાવતો બતાવો કે જે હજુ સુધી સ્ટેજ કરવામાં આવી નથી 68 | 69 | 70 | ```$ git add [file]``` 71 | 72 | સંસ્કરણ નિયંત્રણ માટે ફાઇલ સ્નેપશોટ બનાવો 73 | 74 | 75 | ```$ git diff --staged``` 76 | 77 | સ્ટેજીંગ અને અંતિમ ફાઇલ સંસ્કરણ વચ્ચે તફાવત બતાવો 78 | 79 | 80 | ```$ git reset [file]``` 81 | 82 | સ્ટેજિંગમાંથી ફાઇલને દૂર કરો, પરંતુ તેની સામગ્રીઓ રાખો 83 | 84 | 85 | ```$ git commit -m"[descriptive message]"``` 86 | 87 | સંસ્કરણ ઇતિહાસમાં કાયમી ધોરણે ફાઇલ સ્નેપશોટ રેકોર્ડ કરો 88 | 89 | ## જૂથ ફેરફાર 90 | પૂર્ણ થયેલા પ્રયાસોની શ્રેણીને નામ આપો 91 | 92 | 93 | ```$ git branch``` 94 | 95 | વર્તમાન ભંડાર પર તમામ સ્થાનિક શાખાઓની યાદી બનાવો 96 | 97 | 98 | ```$ git branch [branch-name]``` 99 | 100 | નવી શાખા બનાવો 101 | 102 | 103 | ```$ git switch -c [branch-name]``` 104 | 105 | ઉલ્લેખિત શાખા પર સ્વિચ કરો અને કાર્યકારી નિર્દેશિકા અપડેટ કરો 106 | 107 | 108 | ```$ git merge [branch-name]``` 109 | 110 | ઉલ્લેખિત શાખાના ઇતિહાસને વર્તમાન શાખામાં મર્જ કરો 111 | 112 | 113 | ```$ git branch -d [branch-name]``` 114 | 115 | ઉલ્લેખિત શાખા કાઢી નાખો 116 | {% endcapture %} 117 |
118 | {{ colTwo | markdownify }} 119 |
120 |
121 | 122 | 123 | {% capture colThree %} 124 | ## ફાઇલ નામ સંસ્થા 125 | આવૃત્તિવાળી ફાઇલોને ખસેડો અને કાઢી નાખો 126 | 127 | 128 | ```$ git rm [file]``` 129 | 130 | કાર્યકારી નિર્દેશિકામાંથી ફાઇલને દૂર કરો અને પગલું કાઢી નાખો 131 | 132 | 133 | ```$ git rm --cached [file]``` 134 | 135 | સંસ્કરણ નિયંત્રણમાંથી ફાઇલો દૂર કરો અને સ્થાનિક ફાઇલો રાખો 136 | 137 | 138 | ```$ git mv [file-original] [file-renamed]``` 139 | 140 | ફાઇલનું નામ બદલો અને કમિટ માટે તૈયાર કરો 141 | 142 | ## ટ્રેકિંગ પ્રતિબંધો 143 | અસ્થાયી ફાઇલો અને પાથને બાકાત રાખો 144 | 145 | ``` 146 | *.log 147 | build/ 148 | temp-* 149 | ``` 150 | 151 | `.gitignore` તમને ઉલ્લેખિત પેટર્ન સાથે મેળ ખાતી ફાઇલો અને પાથથી અટકાવે છે 152 | 153 | 154 | ```$ git ls-files --others --ignored --exclude-standard``` 155 | 156 | પ્રોજેક્ટમાં સમાવેલ નથી તેવી ફાઇલોની યાદી બનાવો 157 | 158 | ## ટુકડાઓ સાચવો 159 | અપૂર્ણ ફેરફારોને આશ્રય અને પુનઃસ્થાપિત કરો 160 | 161 | 162 | ```$ git stash``` 163 | 164 | ટ્રૅક કરેલી ફાઇલોને બધા ફેરફારો સાથે અસ્થાયી રૂપે સાચવો 165 | 166 | 167 | ```$ git stash pop``` 168 | 169 | તાજેતરમાં સાચવેલી ફાઇલ પુનઃપ્રાપ્ત કરો 170 | 171 | 172 | ```$ git stash list``` 173 | 174 | બધા અસ્થાયી રૂપે સાચવેલા ફેરફાર સેટની સૂચિ બનાવો 175 | 176 | 177 | ```$ git stash drop``` 178 | 179 | સૌથી તાજેતરમાં સાચવેલ ફેરફારને કાઢી નાખે છે 180 | {% endcapture %} 181 |
182 | {{ colThree | markdownify }} 183 |
184 | 185 | {% capture colFour %} 186 | ## ઇતિહાસ તપાસ 187 | પ્રોજેક્ટ ફાઇલની પ્રગતિ તપાસો 188 | 189 | 190 | ```$ git log``` 191 | 192 | વર્તમાન શાખા માટે સંસ્કરણ ઇતિહાસની સૂચિ જુઓ 193 | 194 | 195 | ```$ git log --follow [file]``` 196 | 197 | નામ સહિત, ફાઇલ માટે સંસ્કરણ ઇતિહાસની સૂચિ આપે છે 198 | 199 | 200 | ```$ git diff [first-branch]...[second-branch]``` 201 | 202 | બે શાખાઓ વચ્ચે સામગ્રી તફાવત દર્શાવે છે 203 | 204 | 205 | ```$ git show [commit]``` 206 | 207 | આઉટપુટ મેટા માહિતી અને ઉલ્લેખિત કમિટમાં ફેરફારો 208 | 209 | ## પછી કમિટ કરો 210 | ભૂલો દૂર કરો અને ઇતિહાસ બદલો 211 | 212 | 213 | ```$ git reset [commit]``` 214 | 215 | `[commit]` સ્થાનિક રીતે ફેરફારો રાખીને, પછીના તમામ કમિટ્સને કાઢી નાખે છે 216 | 217 | 218 | ```$ git reset --hard [commit]``` 219 | 220 | ઉલ્લેખિત કમિટ પર પાછા ફરો અને પછીના બધા ફેરફારોને કાઢી નાખો 221 | 222 | ## સમન્વયન બદલો 223 | રિપોઝીટરી બુકમાર્ક અને વિનિમય સંસ્કરણ ઇતિહાસ રજીસ્ટર કરો(URL) 224 | 225 | 226 | ```$ git fetch [remote]``` 227 | 228 | રિપોઝીટરી બુકમાર્ક્સ માંથી તમામ ઇતિહાસ ડાઉનલોડ કરો 229 | 230 | 231 | ```$ git merge [remote]/[branch]``` 232 | 233 | બુકમાર્ક શાખા વર્તમાન સ્થાનિક શાખામાં મર્જ કરો 234 | 235 | 236 | ```$ git push [remote] [branch]``` 237 | 238 | તમામ સ્થાનિક શાખા GitHub પર અપલોડ કરો 239 | 240 | 241 | ```$ git pull``` 242 | 243 | બુકમાર્ક ઇતિહાસ ડાઉનલોડ કરો અને ફેરફારોને એકીકૃત કરો 244 | {% endcapture %} 245 |
246 | {{ colFour | markdownify }} 247 |
248 | -------------------------------------------------------------------------------- /downloads/hi/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Git Cheat Sheet 5 | byline: Git is the open source distributed version control system that facilitates GitHub activities on your laptop or desktop. This cheat sheet summarizes commonly used Git command line instructions for quick reference. 6 | leadingpath: ../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Git स्थापित करें 11 | GitHub डेस्कटॉप क्लाइंट प्रदान करता है, जिसमें सबसे आम रिपॉजिटरी कार्यों के लिए एक ग्राफिकल यूजर इंटरफेस (GUI) है और 12 | उन्नत परिदृश्य के लिए Git का एक खुद ब खुद सामयिक बनने वाली कमांड लाइन संस्करण. 13 | 14 | ### GitHub Desktop 15 | [desktop.github.com](https://desktop.github.com) 16 | 17 | LINUX या POSIX सिस्टम के लिए Git वितरण आधिकारिक Git SCM वेबसाइट से उपलब्ध हैं। 18 | 19 | ### Git सभी प्लेटफ़ॉर्म के लिए 20 | [git-scm.com](https://git-scm.com) 21 | 22 | ## उपकरण सेटिंग्स 23 | सभी स्थानीय रिपॉजिटरी के लिए उपयोगकर्ता जानकारी कॉन्फ़िगर करें 24 | 25 | ```$ git config --global user.name "[name]"``` 26 | 27 | वह नाम सेट करें जिसे आप अपने कमिटेड लेनदेन से जोड़ना चाहते हैं 28 | 29 | 30 | ```$ git config --global user.email "[email address]"``` 31 | 32 | वह ईमेल सेट करें जिसे आप अपने कमिटेड लेन-देन से जोड़ना चाहते हैं 33 | 34 | 35 | ## रिपॉजिटरी बनाएं 36 | एक नया रिपॉजिटरी शुरू करें या किसी मौजूदा URL से प्राप्त करें 37 | 38 | 39 | ```$ git init [project-name]``` 40 | 41 | निर्दिष्ट नाम के साथ एक स्थानीय भंडार बनाएँ 42 | 43 | 44 | ```$ git clone [url]``` 45 | 46 | परियोजना और सभी संस्करण इतिहास डाउनलोड करें 47 | 48 | {% endcapture %} 49 |
50 | {{ colOne | markdownify }} 51 |
52 | 53 | 54 | {% capture colTwo %} 55 | 56 | ## परिवर्तन करें 57 | संपादन की समीक्षा करें और कमिटेड लेनदेन शिल्प करें 58 | 59 | 60 | ```$ git status``` 61 | 62 | कमिटेड होने वाली नयी एवं बदली गयी फाइलों की सूची देखे 63 | 64 | 65 | ```$ git diff``` 66 | 67 | उन फाइलों के डिफरेंसेस दिखाएं, जो अभी तक स्टेज नहीं हुई है 68 | 69 | 70 | ```$ git add [file]``` 71 | 72 | संस्करण नियंत्रण के लिए फ़ाइल स्नैपशॉट बनाएँ 73 | 74 | 75 | ```$ git diff --staged``` 76 | 77 | स्टेजिंग और अंतिम फ़ाइल संस्करण के बीच अंतर दिखाएं 78 | 79 | 80 | ```$ git reset [file]``` 81 | 82 | फ़ाइल को स्टेजिंग से निकालें, लेकिन इसकी सामग्री को रखें 83 | 84 | 85 | ```$ git commit -m"[descriptive message]"``` 86 | 87 | संस्करण इतिहास में फ़ाइल स्नैपशॉट को स्थायी रूप से रिकॉर्ड करें 88 | 89 | ## समूह परिवर्तन 90 | पूर्ण किए गए प्रयासों की एक श्रृंखला का नाम दें 91 | 92 | 93 | ```$ git branch``` 94 | 95 | वर्तमान रिपॉजिटरी पर सभी स्थानीय शाखाओं को सूचीबद्ध करें 96 | 97 | 98 | ```$ git branch [branch-name]``` 99 | 100 | एक नई शाखा बनाएँ 101 | 102 | 103 | ```$ git switch -c [branch-name]``` 104 | 105 | निर्दिष्ट शाखा पर स्विच करें और कार्य निर्देशिका को अपडेट करें 106 | 107 | 108 | ```$ git merge [branch-name]``` 109 | 110 | वर्तमान शाखा में निर्दिष्ट शाखा के इतिहास को मर्ज करें 111 | 112 | 113 | ```$ git branch -d [branch-name]``` 114 | 115 | निर्दिष्ट शाखा को हटा दें 116 | {% endcapture %} 117 |
118 | {{ colTwo | markdownify }} 119 |
120 |
121 | 122 | 123 | {% capture colThree %} 124 | ## फ़ाइल नाम संगठन 125 | संस्करणित फ़ाइलों को स्थानांतरित करें और हटाएं 126 | 127 | 128 | ```$ git rm [file]``` 129 | 130 | फ़ाइल को कार्य निर्देशिका और चरण हटाने से हटाएं 131 | 132 | 133 | ```$ git rm --cached [file]``` 134 | 135 | संस्करण नियंत्रण से फ़ाइलें निकालें और स्थानीय फ़ाइलें रखें 136 | 137 | 138 | ```$ git mv [file-original] [file-renamed]``` 139 | 140 | फ़ाइल का नाम बदलें और प्रतिबद्ध कमिट के लिए तैयार करें 141 | 142 | ## ट्रैकिंग प्रतिबंध 143 | अस्थायी फ़ाइलों और रास्तों को छोड़ दें 144 | 145 | ``` 146 | *.log 147 | build/ 148 | temp-* 149 | ``` 150 | 151 | `.gitignore` आपको निर्दिष्ट पैटर्न से मेल खाने वाली फ़ाइलों और रास्तों से रोकता है 152 | 153 | 154 | ```$ git ls-files --others --ignored --exclude-standard``` 155 | 156 | प्रोजेक्ट शामिल ना की गई फ़ाइलों को सूचीबद्ध करें 157 | 158 | ## टुकड़े सहेजें 159 | अपूर्ण परिवर्तनों को आश्रय देना और पुनर्स्थापित करना 160 | 161 | 162 | ```$ git stash``` 163 | 164 | सभी परिवर्तनों के साथ ट्रैक की गई फ़ाइलों को अस्थायी रूप से सहेजें 165 | 166 | 167 | ```$ git stash pop``` 168 | 169 | सबसे हाल ही में सहेजी गई फ़ाइल पुनर्प्राप्त करें 170 | 171 | 172 | ```$ git stash list``` 173 | 174 | सभी अस्थायी रूप से सहेजे गए परिवर्तन सेटों को सूचीबद्ध करें 175 | 176 | 177 | ```$ git stash drop``` 178 | 179 | सबसे हाल ही में सहेजे गए परिवर्तन को त्याग देता है 180 | {% endcapture %} 181 |
182 | {{ colThree | markdownify }} 183 |
184 | 185 | {% capture colFour %} 186 | ## इतिहास की जाँच 187 | प्रोजेक्ट फ़ाइल की प्रगति की जाँच करें 188 | 189 | 190 | ```$ git log``` 191 | 192 | संस्करण इतिहास की सूचि देखे वर्तमान शाखा के लिए 193 | 194 | 195 | ```$ git log --follow [file]``` 196 | 197 | फ़ाइल के लिए संस्करण इतिहास सूचीबद्ध करता है, जिसमें नाम शामिल है 198 | 199 | 200 | ```$ git diff [first-branch]...[second-branch]``` 201 | 202 | दो शाखाओं के बीच सामग्री अंतर दिखाता है 203 | 204 | 205 | ```$ git show [commit]``` 206 | 207 | आउटपुट मेटा जानकारी और निर्दिष्ट प्रतिबद्ध के परिवर्तन 208 | 209 | ## फिर कमिट से करना 210 | गलतियों को हटाएं और इतिहास को बदल दें 211 | 212 | 213 | ```$ git reset [commit]``` 214 | 215 | `[commit]` के बाद सभी कमिट हटाता हैं, स्थानीय स्तर पर परिवर्तन रखते हुए 216 | 217 | 218 | ```$ git reset --hard [commit]``` 219 | 220 | निर्दिष्ट कमिट पर लौटें और बाद के सभी परिवर्तनों को छोड़ दें 221 | 222 | ## सिंक्रनाइज़ेशन बदलें 223 | रजिस्टर रिपॉजिटरी बुकमार्क(URL) और एक्सचेंज वर्जन हिस्ट्री 224 | 225 | 226 | ```$ git fetch [remote]``` 227 | 228 | सभी इतिहास को रिपॉजिटरी बुकमार्क से डाउनलोड करें 229 | 230 | 231 | ```$ git merge [remote]/[branch]``` 232 | 233 | वर्तमान स्थानीय शाखा में बुकमार्क शाखा को मर्ज करें 234 | 235 | 236 | ```$ git push [remote] [branch]``` 237 | 238 | सभी स्थानीय शाखा GitHub पर अपलोड करें 239 | 240 | 241 | ```$ git pull``` 242 | 243 | बुकमार्क इतिहास डाउनलोड करें और परिवर्तनों को समेकित करें 244 | {% endcapture %} 245 |
246 | {{ colFour | markdownify }} 247 |
248 | -------------------------------------------------------------------------------- /downloads/id/github-git-advanced-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | # Buku Saku Tingkat Lanjut 2 | 3 | ## Perintah penggabungan 4 | 5 | --- 6 | 7 | Batalkan penggabungan 8 | 9 | `$ git merge --abort` 10 | 11 | ## Perintah penyimpanan 12 | 13 | --- 14 | 15 | Simpan perubahan saat ini dalam penyimpanan dengan nama tertentu 16 | 17 | `$ git stash save ` 18 | 19 | Simpan perubahan saat ini dalam sebuah penyimpanan (dengan nama stash@{0}) 20 | 21 | `$ git stash` 22 | 23 | Hilangkan simpanan di tumpukan teratas 24 | 25 | `$ git stash drop` 26 | 27 | Hilangkan simpanan di indeks tumpukan ke-n 28 | 29 | `$ git stash drop stash@{n}` 30 | 31 | Terapkan penyimpanan di indeks tumpukan ke-n dan hapus dari daftar 32 | 33 | `$ git stash pop stash@{n}` 34 | 35 | Terapkan penyimpanan di indeks tumpukan ke-n 36 | 37 | `$ git stash apply stash@{n}` 38 | 39 | ## Perintah lapor keluar 40 | 41 | --- 42 | 43 | Singkirkan semua perubahan 44 | 45 | `$ git restore .` 46 | 47 | Membuat cabang baru dan pindah ke cabang tersebut 48 | 49 | `$ git switch -c ` 50 | 51 | Membawa satu berkas ke lokasi saat ini dari simpanan 52 | 53 | `$ git restore --source= ` 54 | 55 | ## Perintah tambalan 56 | 57 | --- 58 | 59 | Menerapkan berkas tambalan (.diff atau .patch) ke dalam repo 60 | 61 | `$ git apply ` 62 | 63 | ## Perintah log 64 | 65 | Mendandani riwayat log sebuah git 66 | 67 | `$ git log --pretty=oneline` 68 | -------------------------------------------------------------------------------- /downloads/id/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: Buku Saku Git GitHub 5 | byline: Git adalah sistem manajemen revisi terdistribusi bersifat terbuka yang memfasilitasi aktivitas GitHub di laptop atau komputer pribadi Anda. Buku saku ini meringkas baris perintah instruksi-instruksi Git yang biasa digunakan sebagai referensi singkat. 6 | leadingpath: ../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Memasang Git 11 | GitHub menyediakan klien untuk komputer yang di dalamnya termasuk sebuah 12 | antarmuka grafis untuk tindakan-tindakan yang paling umum dilakukan pada suatu 13 | repositori dan sebuah edisi konsol pembaruan otomatis dari Git untuk skenario 14 | lanjutan. 15 | 16 | ### GitHub untuk Windows 17 | [windows.github.com](https://windows.github.com) 18 | 19 | ### GitHub untuk Mac 20 | [mac.github.com](https://mac.github.com) 21 | 22 | Distribusi Git untuk Linux dan sistem POSIX tersedia di situs resmi Git SCM. 23 | 24 | ### Dokumentasi Lengkap Git 25 | [git-scm.com](https://git-scm.com) 26 | 27 | ## Konfigurasi Git 28 | Konfigurasi informasi Git untuk pengguna dan system lokal 29 | 30 | ```$ git config --global user.name "[nama]"``` 31 | 32 | Mengatur nama yang ingin ditautkan pada transaksi _commit_ Anda 33 | 34 | ```$ git config --global user.email "[alamat surel]"``` 35 | 36 | Mengatur alamat surel yang ingin ditautkan pada transaksi _commit_ Anda 37 | 38 | ## Membuat Repositori 39 | Mulai repositori baru 40 | 41 | ```$ git init [nama-proyek]``` 42 | 43 | Membuat repositori lokal baru dengan nama tertentu 44 | 45 | ```$ git clone [url]``` 46 | 47 | Unduh sebuah proyek dan seluruh riwayat revisinya 48 | 49 | {% endcapture %} 50 |
51 | {{ colOne | markdownify }} 52 |
53 | 54 | 55 | {% capture colTwo %} 56 | 57 | ## Membuat Perubahan 58 | Tinjau suntingan dan buat sebuah transaksi _commit_ 59 | 60 | ```$ git status``` 61 | 62 | Daftar semua berkas baru atau modifikasi yang siap didaftarkan dalam _commit_ 63 | 64 | ```$ git diff``` 65 | 66 | Menunjukkan perbedaan berkas-berkas yang belum didaftarkan dalam _commit_ 67 | 68 | ```$ git add [berkas]``` 69 | 70 | Rekam berkas yang akan didaftarkan ke dalam _commit_ 71 | 72 | ```$ git diff --staged``` 73 | 74 | Menunjukkan perbedaan berkas hasil revisi dengan versi berkas terakhir yang 75 | terdaftar 76 | 77 | ```$ git reset [berkas]``` 78 | 79 | Batal merevisi berkas, namun tetap mempertahankan isinya 80 | 81 | ```$ git commit -m "[pesan deskriptif]"``` 82 | 83 | Daftarkan perubahan berkas secara permanen di riwayat revisi 84 | 85 | ## Perubahan Berkelompok 86 | Menyebutkan serangkaian _commit_ dan menggabungkan upaya yang telah selesai 87 | 88 | ```$ git branch``` 89 | 90 | Daftar semua cabang lokal di repositori saat ini 91 | 92 | ```$ git branch [nama-cabang]``` 93 | 94 | Mewujudkan cabang baru 95 | 96 | ```$ git switch -c [nama-cabang]``` 97 | 98 | Berpindah ke cabang tertentu dan perbarui direktori yang sedang dikerjakan 99 | 100 | ```$ git merge [nama-cabang]``` 101 | 102 | Menggabungkan riwayat cabang tertentu ke dalam cabang yang sedang dipakai 103 | 104 | ```$ git branch -d [nama-cabang]``` 105 | 106 | Hapus cabang tertentu 107 | {% endcapture %} 108 |
109 | {{ colTwo | markdownify }} 110 |
111 |
112 | 113 | 114 | {% capture colThree %} 115 | ## Pergantian Nama Berkas 116 | Merelokasi dan menghapus berkas terevisi 117 | 118 | ```$ git rm [berkas]``` 119 | 120 | Menghapus berkas dari direktori kerja dan daftarkan penghapusan 121 | 122 | ```$ git rm --cached [berkas]``` 123 | 124 | Menghapus berkas dari riwayat revisi dengan tetap mempertahankan berkas lokal 125 | 126 | ```$ git mv [berkas-asli] [berkas-baru]``` 127 | 128 | Mengganti nama berkas dan mempersiapkan berkas untuk pendaftaran _commit_ 129 | 130 | ## Tahan Pelacakan 131 | Mengabaikan berkas dan garis edar sementara 132 | 133 | ``` 134 | *.log 135 | build/ 136 | temp-* 137 | ``` 138 | 139 | Sebuah berkas teks bernama `.gitignore` mengabaikan revisi berkas yang tidak disengaja serta garis edar berkas yang cocok dengan pola tertentu 140 | 141 | ```$ git ls-files --others --ignored --exclude-standard``` 142 | 143 | Daftar semua berkas yang diabaikan dalam proyek tersebut 144 | 145 | ## Menyimpan Fragmen 146 | Menyimpan dan mengembalikan perubahan yang belum lengkap 147 | 148 | ```$ git stash``` 149 | 150 | Menyimpan semua perubahan berkas yang terlacak untuk sementara 151 | 152 | ```$ git stash pop``` 153 | 154 | Mengembalikan berkas yang paling baru disimpan 155 | 156 | ```$ git stash list``` 157 | 158 | Daftar semua koleksi perubahan yang tersimpan 159 | 160 | ```$ git stash drop``` 161 | 162 | Membuang koleksi perubahan yang paling baru disimpan 163 | {% endcapture %} 164 |
165 | {{ colThree | markdownify }} 166 |
167 | 168 | {% capture colFour %} 169 | ## Riwayat Ulasan 170 | Jelajah dan periksa perkembangan berkas-berkas dalam proyek 171 | 172 | ```$ git log``` 173 | 174 | Daftar riwayat revisi untuk cabang saat ini 175 | 176 | ```$ git log --follow [berkas]``` 177 | 178 | Daftar riwayat revisi untuk sebuah berkas, termasuk pergantian namanya 179 | 180 | ```$ git diff [cabang-pertama]...[cabang-kedua]``` 181 | 182 | Menunjukkan perbedaan konten antar dua cabang 183 | 184 | ```$ git show [commit]``` 185 | 186 | Mennampilkan perubahan konten dan _metadata_ dari _commit_ tertentu 187 | 188 | ## Melakukan _Commit_ Kembali 189 | Menghapus kesalahan dan buat riwayat penggantian 190 | 191 | ```$ git reset [commit]``` 192 | 193 | Membatalkan semua _commit_ setelah `[commit]`, dengan melestarikan perubahan lokal 194 | 195 | ```$ git reset --hard [commit]``` 196 | 197 | Membuang semua riwayat dan perubahan sampai di titik yang ditentukan oleh _commit_ 198 | 199 | ## Sinkronisasi Perubahan 200 | Daftarkan _remote_ (URL) dan tukar riwayat repositori 201 | 202 | ```$ git fetch [remote]``` 203 | 204 | Unduh semua riwayat dari repositori _remote_ 205 | 206 | ```$ git merge [remote]/[cabang]``` 207 | 208 | Menggabungkan cabang _remote_ ke dalam cabang lokal saat ini 209 | 210 | ```$ git push [remote] [branch]``` 211 | 212 | Unggah semua _commit_ dari cabang lokal ke GitHub 213 | 214 | ```$ git pull``` 215 | 216 | Unduh riwayat marka dan gabungkan perubahan 217 | {% endcapture %} 218 |
219 | {{ colFour | markdownify }} 220 |
221 | -------------------------------------------------------------------------------- /downloads/it/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Git - riferimento rapido 5 | byline: Git è un software di controllo di versione distribuito. Installando Git sul tuo PC è possibile facilitare le operazioni su GitHub. Questo documento è un riferimento rapido per i comandi Git più usati. 6 | leadingpath: ../../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Installare Git 11 | GitHub offre un client desktop con interfaccia grafica per svolgere le principali funzioni sui repository. È inoltre presente una versione auto-aggiornante di Git da linea di comando, per gli scenari più avanzati. 12 | 13 | ### GitHub per Windows 14 | [windows.github.com](https://windows.github.com) 15 | 16 | ### GitHub per Mac 17 | [mac.github.com](https://mac.github.com) 18 | 19 | Le distribuzioni di Git per Linux e sistemi POSIX sono disponibili sul sito ufficiale di Git SCM. 20 | 21 | ### Git per tutte le piattaforme 22 | [git-scm.com](https://git-scm.com) 23 | 24 | ## Configurazione globale 25 | Configurazione dell'utente valida per tutti i repository 26 | 27 | ```$ git config --global user.name "[name]"``` 28 | 29 | Imposta il nome che vuoi mostrare sulle tue commit 30 | 31 | 32 | ```$ git config --global user.email "[email address]"``` 33 | 34 | Imposta l'email che vuoi mostrare sulle tue commit 35 | 36 | 37 | ## Creare repository 38 | Crea un nuovo repository o clonane uno esistente da un URL 39 | 40 | 41 | ```$ git init [project-name]``` 42 | 43 | Crea un nuovo repository locale con il nome specificato 44 | 45 | 46 | ```$ git clone [url]``` 47 | 48 | Scarica un progetto esistente e il suo storico di cambiamenti 49 | 50 | {% endcapture %} 51 |
52 | {{ colOne | markdownify }} 53 |
54 | 55 | 56 | {% capture colTwo %} 57 | 58 | ## Effettuare modifiche 59 | Rivedi i cambiamenti al codice e prepara una commit 60 | 61 | 62 | ```$ git status``` 63 | 64 | Elenca tutti i file nuovi o modificati 65 | 66 | 67 | ```$ git diff``` 68 | 69 | Mostra le differenze non ancora nell'area di staging 70 | 71 | 72 | ```$ git add [file]``` 73 | 74 | Crea uno snapshot del file in preparazione al versioning 75 | 76 | 77 | ```$ git diff --staged``` 78 | 79 | Mostra le differenze tra staging e ultima modifica 80 | 81 | 82 | ```$ git reset [file]``` 83 | 84 | Rimuovi un file dall'area di staging, ma mantieni le modifiche 85 | 86 | 87 | ```$ git commit -m"[descriptive message]"``` 88 | 89 | Salva gli snapshot dei file in maniera permanente nello storico 90 | 91 | ## Modifiche di gruppo 92 | Aggrega una serie di commit all'interno di un branch 93 | 94 | 95 | ```$ git branch``` 96 | 97 | Elenca tutti i branch nel repository corrente 98 | 99 | 100 | ```$ git branch [branch-name]``` 101 | 102 | Crea un nuovo branch 103 | 104 | 105 | ```$ git switch -c [branch-name]``` 106 | 107 | Passa al branch specificato e aggiorna la directory corrente 108 | 109 | 110 | ```$ git merge [branch-name]``` 111 | 112 | Unisci lo storico del branch specificato con quello corrente 113 | 114 | 115 | ```$ git branch -d [branch-name]``` 116 | 117 | Elimina il branch specificato 118 | {% endcapture %} 119 |
120 | {{ colTwo | markdownify }} 121 |
122 |
123 | 124 | {% capture colThree %} 125 | ## Refactoring dei nomi di file 126 | Ricerca e rimuovi file dallo storico 127 | 128 | 129 | ```$ git rm [file]``` 130 | 131 | Rimuovi un file dalla directory e prepara l'eliminazione definitiva 132 | 133 | 134 | ```$ git rm --cached [file]``` 135 | 136 | Elimina il file dallo storico di versione ma mantieni il file locale 137 | 138 | 139 | ```$ git mv [file-original] [file-renamed]``` 140 | 141 | Modifica il nome del file in preparazione a una commit 142 | 143 | ## Escludere file dallo storico 144 | Escludi file e percorsi temporanei 145 | 146 | ``` 147 | *.log 148 | build/ 149 | temp-* 150 | ``` 151 | 152 | Un file di testo chiamato `.gitignore` previene il versioning accidentale di file o directory secondo un pattern specificato. 153 | 154 | 155 | ```$ git ls-files --others --ignored --exclude-standard``` 156 | 157 | Elenca tutti i file ignorati in questo progetto 158 | 159 | ## Salvare frammenti 160 | Archivia e ripristina cambiamenti incompleti 161 | 162 | 163 | ```$ git stash``` 164 | 165 | Archivia temporaneamente tutti i file modificati 166 | 167 | 168 | ```$ git stash pop``` 169 | 170 | Ripristina tutti i file modificati recentemente 171 | 172 | 173 | ```$ git stash list``` 174 | 175 | Elenca i set di cambiamenti archiviati 176 | 177 | 178 | ```$ git stash drop``` 179 | 180 | Elimina il set di cambiamenti più recente 181 | {% endcapture %} 182 |
183 | {{ colThree | markdownify }} 184 |
185 | 186 | {% capture colFour %} 187 | ## Rivedere lo storico 188 | Esplora l'evoluzione dei file del progetto 189 | 190 | 191 | ```$ git log``` 192 | 193 | Elenca lo storico di versione per il branch corrente 194 | 195 | 196 | ```$ git log --follow [file]``` 197 | 198 | Elenca lo storico di versione per il file specificato, incluse rinominazioni 199 | 200 | 201 | ```$ git diff [first-branch]...[second-branch]``` 202 | 203 | Mostra la differenza tra due branch 204 | 205 | 206 | ```$ git show [commit]``` 207 | 208 | Mostra i metadati e i cambiamenti della commit specificata 209 | 210 | ## Annullare commit 211 | Elimina errori e altera lo storico dei cambiamenti 212 | 213 | 214 | ```$ git reset [commit]``` 215 | 216 | Annulla tutte le commit effettuate dopo `[commit]`, preservando i cambiamenti locali 217 | 218 | 219 | ```$ git reset --hard [commit]``` 220 | 221 | Elimina tutto lo storico e i cambiamenti fino alla commit specificata 222 | 223 | ## Sincronizzare i cambiamenti 224 | Collegati a un URL remoto e ottieni lo storico dei cambiamenti 225 | 226 | 227 | ```$ git fetch [remote]``` 228 | 229 | Scarica lo storico dei cambiamenti dal repository remoto 230 | 231 | 232 | ```$ git merge [remote]/[branch]``` 233 | 234 | Unisci il branch remoto con quello locale 235 | 236 | 237 | ```$ git push [remote] [branch]``` 238 | 239 | Carica tutti i cambiamenti dal branch locale su GitHub 240 | 241 | 242 | ```$ git pull``` 243 | 244 | Scarica lo storico e unisci i cambiamenti 245 | {% endcapture %} 246 |
247 | {{ colFour | markdownify }} 248 |
249 | -------------------------------------------------------------------------------- /downloads/ja/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Git チートシート 5 | byline: Gitはオープンソースとして配布されているバージョン管理システムです。Gitを使うと、あなたのノートまたはデスクトップパソコンから、GitHub上のアクティビティーを操作できます。この早見表にはコマンドラインからよく使われているGitの命令をまとめています。 6 | leadingpath: ../../../ 7 | --- 8 | {% capture colOne %} 9 | ## gitのインストール 10 | GitHubは、利用頻度の高いリポジトリへのアクションを可能にするGUI版と、上級向けに自動的にアップデートされるGitのコマンドライン版を含むデスクトップクライアントを提供しています。 11 | 12 | ### GitHub Desktop 13 | [desktop.github.com](https://desktop.github.com) 14 | 15 | LinuxまたはPOSIXシステムのためのGitディストリビューションは公式のGit SCMウェブサイトから入手できます。 16 | 17 | ### Git 全プラットフォーム版 18 | [git-scm.com](https://git-scm.com) 19 | 20 | ## ツールの設定 21 | すべてのローカルリポジトリ用の、ユーザー情報設定方法 22 | 23 | 24 | ```$ git config --global user.name "[name]"``` 25 | 26 | コミット操作に付加されるあなたの名前を設定します 27 | 28 | 29 | ```$ git config --global user.email "[email address]"``` 30 | 31 | コミット操作に付加されるあなたのメールアドレスを設定します 32 | 33 | 34 | ## リポジトリの作成 35 | リポジトリを新規作成するもしくは既存のURLから取得します 36 | 37 | 38 | ```$ git init [project-name]``` 39 | 40 | 指定した名前のローカルリポジトリを作成します 41 | 42 | 43 | ```$ git clone [url]``` 44 | 45 | プロジェクトとすべてのバージョン履歴をダウンロードします 46 | 47 | {% endcapture %} 48 |
49 | {{ colOne | markdownify }} 50 |
51 | 52 | {% capture colTwo %} 53 | 54 | ## 変更の作成 55 | 変更をレビューしコミット操作ログを作成します 56 | 57 | 58 | ```$ git status``` 59 | 60 | コミット可能なすべての新規または変更のあるファイルを一覧で表示します 61 | 62 | 63 | ```$ git diff``` 64 | 65 | まだステージされていないファイルの差分を表示します 66 | 67 | 68 | ```$ git add [file]``` 69 | 70 | バージョン管理のためにファイルのスナップショットを作成します 71 | 72 | 73 | ```$ git diff --staged``` 74 | 75 | ステージングと最後のファイルバージョンとの差分を表示します 76 | 77 | 78 | ```$ git reset [file]``` 79 | 80 | ファイルをステージングから外しますが、その内容は保持します 81 | 82 | 83 | ```$ git commit -m"[descriptive message]"``` 84 | 85 | ファイルのスナップショットをバージョン履歴内に恒久的に記録します 86 | 87 | ## 変更の整理 88 | 一連のコミットに名前をつけ、完了した成果を結合します 89 | 90 | 91 | ```$ git branch``` 92 | 93 | 現在のリポジトリ上のすべてのローカルブランチを一覧で表示します 94 | 95 | 96 | ```$ git branch [branch-name]``` 97 | 98 | 新規ブランチを作成します 99 | 100 | 101 | ```$ git switch -c [branch-name]``` 102 | 103 | 指定されたブランチに切り替え、作業ディレクトリを更新します 104 | 105 | 106 | ```$ git merge [branch-name]``` 107 | 108 | 指定されたブランチの履歴を現在のブランチに統合します 109 | 110 | 111 | ```$ git branch -d [branch-name]``` 112 | 113 | 指定されたブランチを削除します 114 | 115 | {% endcapture %} 116 |
117 | {{ colTwo | markdownify }} 118 |
119 |
120 | 121 | 122 | {% capture colThree %} 123 | ## ファイル名の整理 124 | バージョン管理されているファイルの移動、または削除を行ないます 125 | 126 | 127 | ```$ git rm [file]``` 128 | 129 | 作業ディレクトリからファイルを削除し、削除をステージします 130 | 131 | 132 | ```$ git rm --cached [file]``` 133 | 134 | バージョン管理からファイルを削除して、ローカルのファイルは保持します 135 | 136 | 137 | ```$ git mv [file-original] [file-renamed]``` 138 | 139 | ファイル名を変更し、コミットします 140 | 141 | ## トラッキングの制限 142 | 一時ファイルやパスを除外します 143 | 144 | ``` 145 | *.log 146 | build/ 147 | temp-* 148 | ``` 149 | 150 | `.gitignore` という名前のテキストファイルで、指定されたパターンに該当するファイルやパスを誤ってバージョン管理してしまうことを防げます 151 | 152 | 153 | ```$ git ls-files --others --ignored --exclude-standard``` 154 | 155 | プロジェクト内のすべての除外されたファイルを一覧で表示します 156 | 157 | ## 断片の保存 158 | 未完成の変更を一時的に退避し、復旧させることができます 159 | 160 | 161 | ```$ git stash``` 162 | 163 | すべての変更のあるトラックされているファイルを一時的に保存します 164 | 165 | 166 | ```$ git stash pop``` 167 | 168 | 直近に一時保存されたファイルを復旧します 169 | 170 | 171 | ```$ git stash list``` 172 | 173 | すべての一時保存された変更セットを一覧で表示します 174 | 175 | 176 | ```$ git stash drop``` 177 | 178 | 直近に一時保存された変更セットを破棄します 179 | 180 | {% endcapture %} 181 |
182 | {{ colThree | markdownify }} 183 |
184 | 185 | {% capture colFour %} 186 | 187 | ## 履歴の確認 188 | プロジェクトファイルの進展を確認します 189 | 190 | 191 | ```$ git log``` 192 | 193 | 現在のブランチのバージョン履歴を一覧で表示します 194 | 195 | 196 | ```$ git log --follow [file]``` 197 | 198 | 名前の変更を含む指定したファイルのバージョン履歴の一覧を表示します 199 | 200 | 201 | ```$ git diff [first-branch]...[second-branch]``` 202 | 203 | 2つのブランチ間の差分を表示します 204 | 205 | 206 | ```$ git show [commit]``` 207 | 208 | 指定されたコミットのメタ情報と変更内容を出力します 209 | 210 | ## コミットの修正 211 | ミスの削除と履歴の置き換え 212 | 213 | 214 | ```$ git reset [commit]``` 215 | 216 | `[commit]`以降すべてのコミットを取り消し、ローカルでは変更を保持します 217 | 218 | 219 | ```$ git reset --hard [commit]``` 220 | 221 | 指定されたコミットに戻り、それ以降のすべての変更を破棄します 222 | 223 | ## 変更の同期 224 | リポジトリのブックマークを登録し、バージョン履歴を交換します 225 | 226 | 227 | ```$ git fetch [bookmark]``` 228 | 229 | リポジトリブックマークからすべての履歴をダウンロードします 230 | 231 | 232 | ```$ git merge [bookmark]/[branch]``` 233 | 234 | ブックマークのブランチを現在のローカルブランチに統合します 235 | 236 | 237 | ```$ git push [alias] [branch]``` 238 | 239 | すべてのローカルブランチのコミットをGitHubにアップロードします 240 | 241 | 242 | ```$ git pull``` 243 | 244 | ブックマークの履歴をダウンロードし、変更を統合します 245 | 246 | {% endcapture %} 247 |
248 | {{ colFour | markdownify }} 249 |
250 | -------------------------------------------------------------------------------- /downloads/ja/github-git-cheat-sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/training-kit/a50017c8aaa942a9535b73bf55191c22bd8a60b3/downloads/ja/github-git-cheat-sheet.pdf -------------------------------------------------------------------------------- /downloads/ko/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Git Cheat Sheet 5 | byline: Git은 여러분의 노트북이나 데스크톱에서 GitHub을 사용할 수 있도록 해주는 오픈 소스 분산 버전 관리 시스템입니다. 이 Cheat Sheet는 자주 쓰이는 Git 명령을 쉽게 찾아볼 수 있게 정리하여 보여줍니다. 6 | leadingpath: ../../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Git 설치하기 11 | GitHub은 일반적으로 많이 사용되는 저장소 관련 작업을 위한 데스크톱 클라이언트와 함께, 더 복잡한 작업을 위해 자동으로 업데이트되는 Git command line 에디션을 제공합니다. 12 | 13 | ### Windows 사용자를 위한 GitHub 14 | [windows.github.com](https://windows.github.com) 15 | 16 | ### Mac 사용자를 위한 GitHub 17 | [mac.github.com](https://mac.github.com) 18 | 19 | 리눅스와 POSIX 운영체제를 위한 Git 배포 버전은 Git의 공식 웹사이트인 Git SCM에서 확인하실 수 있습니다. 20 | 21 | ### 모든 플랫폼을 위한 Git 22 | [git-scm.com](https://git-scm.com) 23 | 24 | ## 환경 설정 25 | 모든 로컬 저장소에 적용할 사용자 정보를 설정합니다 26 | 27 | ```$ git config --global user.name "[name]"``` 28 | 29 | 자신이 생성한 커밋(commit)에 들어갈 이름을 설정합니다 30 | 31 | ```$ git config --global user.email "[email address]"``` 32 | 33 | 자신이 생성한 커밋에 들어갈 이메일 주소를 설정합니다 34 | 35 | 36 | ## 저장소 생성하기 37 | 새로운 저장소를 만들거나, 다른 저장소의 URL을 이용해 저장소를 복사합니다 38 | 39 | 40 | ```$ git init [project-name]``` 41 | 42 | 새로운 로컬 저장소를 생성하고 이름을 정합니다. 43 | 44 | 45 | ```$ git clone [url]``` 46 | 47 | 기존 프로젝트의 모든 커밋 내역을 가져와 저장소를 만듭니다 48 | 49 | {% endcapture %} 50 |
51 | {{ colOne | markdownify }} 52 |
53 | 54 | 55 | {% capture colTwo %} 56 | 57 | ## 변경점을 저장하기 58 | 수정 사항을 검토하고 커밋을 생성합니다 59 | 60 | 61 | ```$ git status``` 62 | 63 | 커밋할 수 있는 새로운 파일과 수정된 파일의 목록을 보여줍니다 64 | 65 | ```$ git diff``` 66 | 67 | 수정하였으나 아직 stage하지 않은 파일의 변경점을 보여줍니다 68 | 69 | 70 | ```$ git add [file]``` 71 | 72 | 커밋을 준비하기 위해 파일을 stage합니다 73 | 74 | 75 | ```$ git diff --staged``` 76 | 77 | stage하였으나 아직 커밋하지 않은 파일과 가장 최근에 커밋한 파일을 비교합니다 78 | 79 | 80 | ```$ git reset [file]``` 81 | 82 | 파일의 내용은 유지한 채로 stage한 내역만을 제거합니다 83 | 84 | 85 | ```$ git commit -m"[descriptive message]"``` 86 | 87 | stage한 내용을 커밋으로 영구히 저장합니다 88 | 89 | ## 변경점을 묶어 관리하기 90 | 일련의 커밋에 이름을 붙이고 여러 변경점을 합칩니다 91 | 92 | 93 | ```$ git branch``` 94 | 95 | 현재 저장소의 모든 로컬 브랜치를 보여줍니다 96 | 97 | ```$ git branch [branch-name]``` 98 | 99 | 새로운 브랜치를 생성합니다 100 | 101 | 102 | ```$ git switch -c [branch-name]``` 103 | 104 | 특정 브랜치로 전환하고 워킹 디렉토리를 업데이트합니다 105 | 106 | 107 | ```$ git merge [branch-name]``` 108 | 109 | 현재 브랜치에 특정 브랜치의 히스토리를 병합시킵니다 110 | 111 | 112 | ```$ git branch -d [branch-name]``` 113 | 114 | 브랜치를 삭제합니다 115 | {% endcapture %} 116 |
117 | {{ colTwo | markdownify }} 118 |
119 |
120 | 121 | 122 | {% capture colThree %} 123 | ## 파일 이름 바꾸기 124 | 버전 관리 중인 파일을 옮기거나 삭제합니다 125 | 126 | ```$ git rm [file]``` 127 | 128 | 워킹 디렉토리에 있는 파일을 제거하고 삭제한 내역을 stage합니다 129 | 130 | 131 | ```$ git rm --cached [file]``` 132 | 133 | 현재 파일은 그대로 두고 버전 관리 체계에서만 제거합니다 134 | 135 | ```$ git mv [file-original] [file-renamed]``` 136 | 137 | 파일명을 변경하고 해당 내역을 stage합니다 138 | 139 | ## 특정 파일을 저장소에서 제외하기 140 | 임시 파일과 경로를 제외시킵니다 141 | 142 | ``` 143 | *.log 144 | build/ 145 | temp-* 146 | ``` 147 | 148 | `.gitignore`이라는 텍스트 파일에 제외할 문자열 패턴을 지정하여 실수로 엉뚱한 파일이나 경로가 저장되지 않게 방지할 수 있습니다 149 | 150 | 151 | ```$ git ls-files --others --ignored --exclude-standard``` 152 | 153 | 이 프로젝트에서 제외된 모든 파일을 보여줍니다 154 | 155 | ## 변경점 일부분을 저장하기 156 | 불완전한 변경 사항을 임시로 저장하거나 복원합니다 157 | 158 | 159 | ```$ git stash``` 160 | 161 | 버전 관리 중인 모든 파일의 변경점을 임시로 저장합니다 162 | 163 | 164 | ```$ git stash pop``` 165 | 166 | 가장 최근에 임시 저장한 내용을 복원합니다 167 | 168 | 169 | ```$ git stash list``` 170 | 171 | 임시 저장된 모든 변경점의 목록을 보여줍니다 172 | 173 | 174 | ```$ git stash drop``` 175 | 176 | 가장 최근에 임시 저장한 내용을 지웁니다 177 | {% endcapture %} 178 |
179 | {{ colThree | markdownify }} 180 |
181 | 182 | {% capture colFour %} 183 | ## 변경 기록 검토 184 | 프로젝트 내 파일의 변경 기록을 살펴보고 검토합니다 185 | 186 | 187 | ```$ git log``` 188 | 189 | 현재 브랜치의 변경 기록을 보여줍니다 190 | 191 | ```$ git log --follow [file]``` 192 | 193 | 특정 파일의 변경 기록을 보여줍니다(파일명 변경 포함) 194 | 195 | ```$ git diff [first-branch]...[second-branch]``` 196 | 197 | 두 브랜치의 차이점을 비교합니다 198 | 199 | ```$ git show [commit]``` 200 | 201 | 특정 커밋에 포함된 변경 사항과 메타데이터를 표시합니다 202 | 203 | ## 커밋 되돌리기 204 | 실수한 내용을 지우고 기록을 바꿉니다 205 | 206 | ```$ git reset [commit]``` 207 | 208 | 현재 파일의 변경 사항은 그대로 두고 '[커밋]' 이후의 모든 커밋 내용을 되돌립니다 209 | 210 | ```$ git reset --hard [commit]``` 211 | 212 | 모든 변경점과 기록을 버리고 특정 커밋으로 되돌아갑니다 213 | 214 | ## 변경점을 동기화하기 215 | 원격 저장소(의 URL)을 등록하고 저장소 기록을 주고받습니다 216 | 217 | ```$ git fetch [remote]``` 218 | 219 | 원격 저장소로부터 모든 기록을 받아옵니다 220 | 221 | ```$ git merge [remote]/[branch]``` 222 | 223 | 원격 브랜치를 현재 사용 중인 로컬 브랜치와 병합합니다 224 | 225 | ```$ git push [remote] [branch]``` 226 | 227 | 모든 로컬 브랜치의 변경점을 GitHub에 업로드합니다 228 | 229 | ```$ git pull``` 230 | 231 | 북마크된 원격 브랜치의 기록을 다운로드하여 변경점을 병합합니다 232 | {% endcapture %} 233 |
234 | {{ colFour | markdownify }} 235 |
236 | -------------------------------------------------------------------------------- /downloads/ml/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: ഗിറ്റ്ഹബ് ബാശ് ചീറ്റ് ഷീറ്റ് 5 | byline: ജിഎൻയു പ്രോജക്ടിന്റെ ഷെല്ലാണ് ബാഷ്. ബാഷ് ആണ് ബോൺ എഗെയ്ൻ ഷെൽ. കോൺ ഷെൽ (ksh), C ഷെൽ (csh) എന്നിവയിൽ നിന്നുള്ള ഉപയോഗപ്രദമായ സവിശേഷതകൾ ഉൾക്കൊള്ളുന്ന ഒരു sh- അനുയോജ്യമായ ഷെല്ലാണ് ബാഷ്. ഇത് IEEE POSIX P1003.2/ISO 9945.2 ഷെൽ ആൻഡ് ടൂൾസ് സ്റ്റാൻഡേർഡ് അനുസരിച്ചാണ് ഉദ്ദേശിക്കുന്നത്. പ്രോഗ്രാമിംഗിനും സംവേദനാത്മക ഉപയോഗത്തിനും ഇത് sh- ൽ പ്രവർത്തനപരമായ മെച്ചപ്പെടുത്തലുകൾ വാഗ്ദാനം ചെയ്യുന്നു. കൂടാതെ, മിക്ക sh സ്ക്രിപ്റ്റുകളും പരിഷ്ക്കരിക്കാതെ ബാഷ് പ്രവർത്തിപ്പിക്കാൻ കഴിയും. 6 | leadingpath: ../../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## ബാഷ് ഇൻസ്റ്റാൾ ചെയ്യുക 11 | ബാഷ് സാധാരണയായി ലിനക്സ്/യുണിക്സ് അധിഷ്ഠിത മെഷീനുകളിലെ ഒരു നേറ്റീവ് ആപ്ലിക്കേഷനാണ്; എന്നിരുന്നാലും, ഇൻസ്റ്റാളേഷൻ ആവശ്യമാണെങ്കിൽ, ഡൗൺലോഡുകളുടെ ലിങ്കുകൾ നിങ്ങൾക്ക് ചുവടെ കണ്ടെത്താനാകും. 12 | 13 | ### വിൻഡോസിനായുള്ള ബാഷ് 14 | ബാഷ് വിൻഡോസ് സ്വദേശിയല്ലാത്തതിനാൽ, ലിനക്സ്/മാകോസിൽ എളുപ്പത്തിൽ ലഭ്യമാകുന്ന അതേ സവിശേഷതകൾ നേടാൻ സിഗ്വിൻ പോലുള്ള ഒരു ആപ്ലിക്കേഷൻ ആവശ്യമാണ്. 15 | https://www.cygwin.com 16 | 17 | ## മാകോസിനും ലിനക്സിനുമുള്ള ബാഷ് 18 | ലിനക്സ്/യുണിക്സ് അടിസ്ഥാനമാക്കിയുള്ള മെഷീനുകളിൽ ബാഷ് നേറ്റീവ് ആയി ഇൻസ്റ്റാൾ ചെയ്തു 19 | 20 | ```$ alias ls='ls -lGh'``` 21 | 22 | ഫയൽ വലുപ്പ സഫിക്സുകൾ ലിസ്റ്റുചെയ്യാനും വർണ്ണമാക്കാനും നൽകാനും ls കമാൻഡ് സജ്ജമാക്കുന്നു 23 | 24 | ## ഡയറക്ടറികളുമായി പ്രവർത്തിക്കുന്നു 25 | ഡയറക്ടറി ഫോൾഡറുകളും ഫയലുകളും നാവിഗേറ്റുചെയ്യുക, സൃഷ്ടിക്കുക, ഇല്ലാതാക്കുക 26 | 27 | ```$ pwd``` 28 | 29 | നിലവിലെ വർക്കിംഗ് ഡയറക്ടറിയുടെ പ്രദർശന പാത 30 | 31 | ```$ cd [ഡയറക്ടറി]``` 32 | 33 | വർക്കിംഗ് ഡയറക്ടറി [ഡയറക്ടറി] ആയി മാറ്റുക 34 | 35 | ```$ cd ..``` 36 | 37 | പാരന്റ് ഡയറക്ടറിയിലേക്ക് നാവിഗേറ്റ് ചെയ്യുക 38 | 39 | ```$ ls``` 40 | 41 | ഡയറക്ടറി ഉള്ളടക്കങ്ങൾ ലിസ്റ്റ് ചെയ്യുക 42 | 43 | ```$ ls -la``` 44 | 45 | മറച്ച ഫയലുകൾ ഉൾപ്പെടെ വിശദമായ ഡയറക്ടറി ഉള്ളടക്കങ്ങൾ ലിസ്റ്റ് ചെയ്യുക 46 | 47 | 48 | ```$ mkdir [ഡയറക്ടറി]``` 49 | 50 | [ഡയറക്ടറി] എന്ന പേരിൽ ഒരു പുതിയ ഡയറക്ടറി സൃഷ്ടിക്കുക 51 | 52 | {% endcapture %} 53 |
54 | {{ colOne | markdownify }} 55 |
56 | 57 | {% capture colTwo %} 58 | 59 | ## ഔട്ട്പുട്ട് കൈകാര്യം ചെയ്യുന്നു 60 | ഒരു ഫയലിൽ നിന്നുള്ള ഡാറ്റ ഒഴുക്ക് നിയന്ത്രിക്കുക 61 | 62 | ```$ cat [ഫയൽ]``` 63 | 64 | [ഫയൽ] ഉള്ളടക്കങ്ങൾ ഔട്ട്പുട്ട് ചെയ്യുക 65 | 66 | 67 | ```$ less [ഫയൽ]``` 68 | 69 | പേജിനേഷൻ പിന്തുണയ്ക്കുന്ന [ഫയലിന്റെ] ഉള്ളടക്കങ്ങൾ ഔട്ട്പുട്ട് ചെയ്യുക 70 | 71 | 72 | ```$ head [ഫയൽ]``` 73 | 74 | [ഫയലിന്റെ] ആദ്യ 10 വരികൾ ഔട്ട്പുട്ട് ചെയ്യുക 75 | 76 | 77 | ```$ [കമാൻഡ്] > [ഫയൽ] ``` 78 | 79 | [കമാൻഡ്] ഔട്ട്പുട്ട് [ഫയലിൽ] ഡയറക്ട് ചെയ്യുക 80 | 81 | 82 | ```$ [കമാൻഡ്] >> [ഫയൽ]``` 83 | 84 | [കമാൻഡ്] ഔട്ട്പുട്ട് [ഫയൽ] ലേക്ക് ചേർക്കുക 85 | 86 | 87 | ```$ [കമാൻഡ് 1] | [കമാൻഡ് 2]``` 88 | 89 | [കമാൻഡ് 1] ന്റെ ഔട്ട്പുട്ട് [കമാൻഡ് 2] ന്റെ ഇൻപുട്ടിലേക്ക് നയിക്കുക 90 | 91 | 92 | ```$ clear``` 93 | 94 | ബാഷ് വിൻഡോ മായ്ക്കുക 95 | 96 | 97 | ## ഫയലുകളുമായി പ്രവർത്തിക്കുന്നു 98 | ഫയലുകൾ നീക്കുക, പേരുമാറ്റുക, സൃഷ്ടിക്കുക, ഇല്ലാതാക്കുക 99 | 100 | ```$ rm [ഫയൽ]``` 101 | 102 | [ഫയൽ] ഇല്ലാതാക്കുക 103 | 104 | 105 | ```$ rm -r [ഡയറക്ടറി]``` 106 | 107 | [ഡയറക്ടറി] ഇല്ലാതാക്കുക 108 | 109 | ```$ rm -f [ഫയൽ]``` 110 | 111 | നിർബന്ധിതമായി ഇല്ലാതാക്കുക [ഫയൽ] (ഒരു ഡയറക്ടറി നിർബന്ധിതമായി ഇല്ലാതാക്കാൻ -r ചേർക്കുക) 112 | 113 | 114 | ```$ mv [പഴയ-ഫയൽ] [പുതിയ-ഫയൽ]``` 115 | 116 | [പഴയ-ഫയൽ] [പുതിയ-ഫയൽ] എന്ന് പേരുമാറ്റുക 117 | 118 | 119 | ```$ cp [ഫയൽ] [ഡയറക്ടറി]``` 120 | 121 | [ഫയൽ] [ഡയറക്ടറി] ലേക്ക് പകർത്തുക (നിലവിലുള്ള ഫയൽ തിരുത്തിയെഴുതാം) 122 | 123 | 124 | ```$ cp -r [ഉറവിടം-ഡയറക്ടറി] [ലക്ഷ്യസ്ഥാനം-ഡയറക്ടറി]``` 125 | 126 | [ഉറവിടം-ഡയറക്ടറി] പകർത്തുക, അതിന്റെ ഉള്ളടക്കം [ലക്ഷ്യസ്ഥാനം-ഡയറക്ടറി] (നിലവിലുള്ള ഡയറക്ടറിയിൽ ഫയലുകൾ തിരുത്തിയെഴുതുന്നത്) 127 | 128 | ```$ touch [ഫയൽ]``` 129 | 130 | ഫയൽ ആക്സസും പരിഷ്ക്കരണ സമയവും അപ്ഡേറ്റ് ചെയ്യുക (കൂടാതെ [ഫയൽ] ഇല്ലെങ്കിൽ സൃഷ്ടിക്കുക) 131 | 132 | {% endcapture %} 133 |
134 | {{ colTwo | markdownify }} 135 |
136 |
137 | 138 | 139 | {% capture colThree %} 140 | ## ഫയൽ, ഫോൾഡർ അനുമതികൾ 141 | ഫയലുകളിലും ഫോൾഡറുകളിലും വായന, എഴുത്ത്, അനുമതികൾ എന്നിവ മാറ്റുക 142 | 143 | 144 | ```$ chmod 755 [ഫയൽ]``` 145 | 146 | [ഫയൽ] അനുമതികൾ 755 ആയി മാറ്റുക 147 | 148 | > അനുമതികളുടെ ഒക്ടൽ പ്രാതിനിധ്യം ഉപയോക്താവ് (u), ഗ്രൂപ്പ് (g), മറ്റുള്ളവർ (o) എന്നിവയ്ക്കായുള്ള വായനയുടെ ആകെത്തുക (4), എഴുതുക (2), (1) അനുമതികൾ നടപ്പിലാക്കുന്നതിനുള്ള അനുമതികളുടെ ഗ്രൂപ്പാണ്. ഉദാഹരണത്തിന്, 755 ആണ്:: 149 | > - ഉടമ = 7; വായിക്കുക (4) + എഴുതുക (2) + നിർവ്വഹിക്കുക (1) 150 | > - ഗ്രൂപ്പ് = 5; വായിക്കുക (4) + നിർവ്വഹിക്കുക (1) 151 | > - മറ്റുള്ളവ = 5; വായിക്കുക (4) + നിർവ്വഹിക്കുക (1) 152 | 153 | 154 | 155 | ```$ chmod -R 600``` 156 | 157 | [ഡയറക്ടറിയുടെ] അനുമതികളും (അതിലെ ഉള്ളടക്കങ്ങളും 600 ആയി മാറ്റുക) 158 | 159 | 160 | ```$ chown [ഉപയോക്താവ്]:[ഗ്രൂപ്പ്] [ഫയൽ]``` 161 | 162 | [ടൈൽ] ഉടമസ്ഥൻ [ഉപയോക്താവ്], [ഗ്രൂപ്പ്] എന്നിവയിലേക്ക് മാറ്റുക (ഒരു ഡയറക്ടറിയുടെ ഉള്ളടക്കം ഉൾപ്പെടുത്താൻ -R ചേർക്കുക) 163 | 164 | ## നെറ്റ്‌വർക്കിംഗും ഇന്റർനെറ്റും 165 | ```$ ping [ip/host]``` 166 | 167 | മറ്റ് കാര്യങ്ങൾക്കൊപ്പം [ip/host] പിംഗ് ചെയ്ത് സമയം പ്രദർശിപ്പിക്കുന്നു 168 | 169 | ```$ curl -O [url]``` 170 | 171 | നിലവിലെ പ്രവർത്തന ഡയറക്ടറിയിലേക്ക് [url] ഡൗൺലോഡുചെയ്യുക 172 | 173 | ```$ ssh [ഉപയോക്താവ്]@[ip/host]``` 174 | 175 | [ഉപയോക്താവ്] ഉപയോഗിച്ച് [ഹോസ്റ്റ്] ലേക്ക് ഒരു SSH കണക്ഷൻ ആരംഭിക്കുന്നു 176 | 177 | ```$ ssh-copy-id [ഉപയോക്താവ്]@[ഹോസ്റ്റ്]``` 178 | 179 | കീ അല്ലെങ്കിൽ പാസ്‌വേഡ് രഹിത ലോഗിൻ പ്രവർത്തനക്ഷമമാക്കുന്നതിന് [ഉപയോക്താവിന്] നിങ്ങളുടെ SSH കീ ഹോസ്റ്റ് ഫയലിലേക്ക് ചേർക്കുന്നു 180 | 181 | ```$ scp [ഫയൽ] [ഉപയോക്താവ്]@[ip/host]:/path/to/ഫയൽ``` 182 | 183 | [ഫയൽ] ഒരു വിദൂരത്തിലേക്ക് [ഹോസ്റ്റ്] സുരക്ഷിതമായി പകർത്തുന്നു 184 | 185 | ```$ wget [ഫയൽ]``` 186 | 187 | നിങ്ങളുടെ നിലവിലെ പ്രവർത്തന ഡയറക്ടറിയിലേക്ക് [ഫയൽ] ഡൗൺലോഡ് ചെയ്യുക 188 | 189 | ## സിസ്റ്റം ടാസ്ക്കുകൾ 190 | 191 | നിങ്ങളുടെ നിലവിൽ പ്രവർത്തിക്കുന്ന സിസ്റ്റവുമായി ബന്ധപ്പെട്ട പ്രധാനപ്പെട്ട വിവരങ്ങൾ കണ്ടെത്തുക 192 | 193 | ```$ ps ax``` 194 | 195 | നിലവിൽ പ്രവർത്തിക്കുന്ന പ്രക്രിയകളുടെ പട്ടിക 196 | 197 | ```$ top``` 198 | 199 | നിങ്ങളുടെ നിലവിൽ പ്രവർത്തിക്കുന്ന പ്രക്രിയകളിൽ തത്സമയ വിവരങ്ങൾ പ്രദർശിപ്പിക്കുന്നു 200 | 201 | ```$ kill [pid]``` 202 | 203 | നൽകിയിരിക്കുന്ന പ്രോസസ്സ് ഐഡി ഉപയോഗിച്ച് പ്രക്രിയ അവസാനിപ്പിക്കുന്നു [pid] 204 | 205 | ```$ killall [പ്രക്രിയയുടെ പേര്]``` 206 | 207 | നൽകിയിരിക്കുന്ന [പ്രക്രിയയുടെ പേര്] ഉപയോഗിച്ച് എല്ലാ പ്രക്രിയകളും അവസാനിപ്പിക്കുന്നു 208 | 209 | ```$ df``` 210 | 211 | ഡിസ്ക് ഉപയോഗം കാണിക്കുന്നു 212 | 213 | ```$ du [ഫയൽ നാമം]``` 214 | 215 | എല്ലാ ഫയലുകളുടെയും ഫോൾഡറുകളുടെയും ഡിസ്ക് ഉപയോഗം [ഫയൽ നാമത്തിൽ] കാണിക്കുന്നു 216 | 217 | {% endcapture %} 218 |
219 | {{ colThree | markdownify }} 220 |
221 | -------------------------------------------------------------------------------- /downloads/ne/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Git Cheat Sheet 5 | byline: Git is the open source distributed version control system that facilitates GitHub activities on your laptop or desktop. This cheat sheet summarizes commonly used Git command line instructions for quick reference. 6 | leadingpath: ../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | 11 | ## इन्स्टल गर्नुहोस 12 | 13 | ### GitHub डेस्कटप 14 | 15 | [desktop.github.com](https://desktop.github.com) 16 | 17 | ### Git सबै प्लेटफर्मका लागि 18 | 19 | [git-scm.com](https://git-scm.com) 20 | 21 | ## Configure गर्नुहोस 22 | 23 | सबै लोकल रेपोजिटोरिहरुको लागि प्रयोगकर्ताको जानकारी configure गर्नुहोस् 24 | 25 | `$ git config --global user.name "[name]"` 26 | 27 | यसले तपाइले commit गर्दा संलग्न गर्न चाहानु भएको नाम सेट गर्दछ 28 | 29 | `$ git config --global user.email "[email address]"` 30 | 31 | यसले तपाइले commit गर्दा संलग्न गर्न चाहानु भएको इमेल सेट गर्दछ 32 | 33 | `$ git config --global color.ui auto` 34 | 35 | यसले कमाण्ड लाइन आउटपुटको रङकरण गर्दछ 36 | 37 | ## Branches 38 | 39 | Branches हरु Git संग काम गर्नलाई महत्त्वपूर्ण हुन्छन्। अहिले "checked out" branch मा तपाइले गरेको commit हरु राखिनेछ। Branch हेर्नकालागि `git status` को प्रयोग गर्न सक्नुहुनेछ। 40 | 41 | `$ git branch [branch-name]` 42 | 43 | यसले नया branch बनाउनेछ 44 | 45 | `$ git switch -c [branch-name]` 46 | 47 | यसले तपाइको working directory लाई तपाइले चयन गर्नुभएको branch मा परिवर्तन गर्नेछ 48 | 49 | `$ git merge [branch]` 50 | 51 | यसले तपाइले चयन गर्नुभएको branch को history ल ाई वर्तमान branch मा मिश्रित गराउनेछ। यो प्रायजसो pull request हरुमा गरिन्छ, तर यो पनि एउटा महत्वपुर्ण कार्य हो। 52 | 53 | `$ git branch -d [branch-name]` 54 | 55 | यसले तपाइले चयन गर्नुभएको branch मेटाउनेछ 56 | 57 | {% endcapture %} 58 | 59 |
60 | {{ colOne | markdownify }} 61 |
62 | 63 | {% capture colTwo %} 64 | 65 | ## Repository बनाउनुहोस 66 | 67 | नया repository आफ्नो कम्प्युटरमा बनाउन सकिन्छ अथवा कसैले बनाएको repository क्लोन गर्न सकिन्छ। यदी तपाइले आफ्नो कम्प्युटरमा repository बनाउनु भयो भने उक्त repository लाई पछि GitHub मा push गर्नुपर्ने हुन्छ। 68 | 69 | `$ git init` 70 | 71 | यदी तपाइले काम गर्दै गरेको directory मा `git init` कमाण्ड रन गर्नुभयो भने उक्त directory लाई Git repository मा परिणत गर्नेछ। `git init` कमाण्ड प्रयोग गरेपछि, उक्त directory लाई खाली Git repository संग लिंक गर्न निम्न कमाण्ड प्रयोग गर्नुहोस् : 72 | 73 | `$ git remote add origin [url]` 74 | 75 | यसले तपाइको कम्प्युटर मा भएको लोकल repository लाई remote repository संग लिंक गर्नेछ। URL ले GitHub मा भएको repository लाई औंलााउनेछ। 76 | 77 | `$ git clone [url]` 78 | 79 | यसले URL को, repository लाई डाउनलोड अथवा क्लोन गर्नेछ। क्लोनमा सबै फाइल, branch अनि commit हरु संलग्न गरिनेछ। 80 | 81 | ## .gitignore फाइल 82 | 83 | कहिले कहिँ कुनै फाइलहरु Git ले ट्रयाक न गर्नु राम्रो विचार हुन सक्छ। यो प्रक्रिया एउटा फाइल मा गरिन्छ जसको नाम `.gitignore` हो। यसका लागि तपाइले टेम्पलेट [github.com/github/gitignore](https://github.com/github/gitignore) मा भेटाउन सक्नुहुनेछ। 84 | 85 | ## परिवर्तनहरु syncornization गर्नुहोस 86 | 87 | तपाइको कम्प्युटर मा रहेको लोकल repository लाई github.com को remote repository संग synchronize गर्नुहोस 88 | 89 | `$ git fetch` 90 | 91 | यसले रिमोट ट्रयाकइंग branch को सबै डाउनलोड गर्नेछ 92 | 93 | `$ git merge` 94 | 95 | यसले रिमोट ट्रयाकइंग branch लाई वर्तमान लोकल संग मिश्रित गर्नेछ 96 | 97 | `$ git push` 98 | 99 | यसले लोकल branch को सबै commit लाई GitHub मा अपलोड गर्नेछ 100 | 101 | `$ git pull` 102 | 103 | यसले तपाइको वर्तमान working repository लाई तेही अनुरुपको रिमोट branch को परिवर्तनहरु संग अपडेट गर्नेछ l `git pull`, `git fetch`, र `git merge` को संयोजन हो। 104 | 105 | {% endcapture %} 106 | 107 |
108 | {{ colTwo | markdownify }} 109 |
110 |
111 | 112 | {% capture colThree %} 113 | 114 | ## Make changes 115 | 116 | प्रोजेक्ट फाइलको एभोलुशन ब्राउज र इन्स्पेक्ट गर्नुहोस् 117 | 118 | `$ git log` 119 | 120 | यसले वर्तमान branchको भर्सन हिस्ट्री लिस्ट गर्नेछ 121 | 122 | `$ git log --follow [file]` 123 | 124 | यसले फाइल को भर्जन हिस्ट्री लिस्ट गर्नेछ, रिनेम भाएक (एउटा फाइलको लागि मात्रै काम गर्नेछ) 125 | 126 | `$ git diff [first-branch]...[second-branch]` 127 | 128 | यसले दुइ branch बिच भिन्नता देखाउनेछ 129 | 130 | `$ git show [commit]` 131 | 132 | यसले निर्धारित commit र मेटाडाटा को परिवर्तन हरु देखाउनेछ 133 | 134 | `$ git add [file]` 135 | 136 | यसले भर्जनिंग को लागि काम गरिराखेको फाइल को स्न्यापसट लिनेछ 137 | 138 | `$ git commit -m "[descriptive message]"` 139 | 140 | यसले कामगरिराखेको फाइल को स्न्यापसट 141 | 142 | ## commits दोहोराउनुहोस 143 | 144 | यसले गल्ति र क्राफ्ट रिप्लेस्मेंट हिस्ट्री मेटाउछ 145 | 146 | `$ git reset [commit]` 147 | 148 | यसले परिवर्तनहरुलाई लोकल्ली प्रिजर्व गरेर,`[commit]` पछाडिको commits हरु मेटाउछ 149 | 150 | `$ git reset --hard [commit]` 151 | 152 | यसले सबै history मेटाएर निर्धारित commit मा लाग्नेछ 153 | 154 | > साबधान! हिस्ट्री परिवर्तन गर्दा धेरै साइड इफ्फेक्ट हुनसक्छन l यदी तपाईलाई GitHub मा भएको हिस्ट्री परिवर्तन गर्न खोज्दैहुनुन्छ भने साबधानी अप्प्नाउनु होला l की समस्या भए [github.community](https://github.community) मा जान सक्नुहुनेछ अथवा सुप्पोर्ट टिमलाई सम्पर्क गर्नसक्नुहुने छ। 155 | 156 | {% endcapture %} 157 | 158 |
159 | {{ colThree | markdownify }} 160 |
161 | 162 | {% capture colFour %} 163 | 164 | ## Glossary 165 | 166 | - **Git**: एउटा ओपन सोर्स, वितरित भर्जन कन्ट्रोल सिस्टम 167 | - **GitHub**: Git repositories होस्ट गर्ने र अरु संग collaborate गर्ने प्लेटफर्म 168 | - **commit**: Repository को सबै परिवर्तन हरु को स्न्यापसट 169 | - **branch**: Commit लाई पोइन्ट गर्ने पोइन्टर 170 | - **clone**: सबै commit र branches भएको Remote repositoryको लोकल भर्जन 171 | - **remote**: सबै योगदानकर्ता ले योगदान आदान प्रदान गर्न मिल्ने common GitHub repository 172 | - **fork**: अरु कसैको GitHub repository को कपि 173 | - **pull request**: repository मा परिवर्तनहरु सल्लाह गर्ने स्थान 174 | - **HEAD**: वर्तमान working directory लाई जनाउने पोइंटर, HEAD पोइंटर लाई `git switch` को प्रयोग गरेर विभिन्न branches, tags र commits लाई पोइन्ट गर्न सकिन्छ 175 | 176 | {% endcapture %} 177 | 178 |
179 | {{ colFour | markdownify }} 180 |
181 |
182 | -------------------------------------------------------------------------------- /downloads/pl/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Git Ściąga 5 | byline: Git to otwartoźródłowy rozproszony system kontroli wersji który umożliwia działanie GitHuba na twoim laptopie lub komputerze stacjonarnym. Ta ściąga podsumowuje najczęściej używane komendy wiersza poleceń Gita w celu szybkiego dostępu. 6 | leadingpath: ../../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Instalacja Gita 11 | GitHub dostarcza klienta dla komputerów który zawiera interfejs graficzny dla najbardziej powszechnych akcji w repozytorium i automatycznie aktualizuje edycje Gita w lini komend dla zaawansowanych scenariuszy. 12 | 13 | ### GitHub Desktop 14 | [desktop.github.com](https://desktop.github.com) 15 | 16 | Dystrybucje Gita dla systemu Linux i POSIX dostępne są na oficjalnej stronie Git SCM. 17 | 18 | ### Git dla wszystkich platform 19 | [git-scm.com](https://git-scm.com) 20 | 21 | ## Konfiguracja narzędzi 22 | Skonfiguruj informacje o użytkowniku dla wszystkich lokalnych repozytoriów 23 | 24 | ```$ git config --global user.name "[nazwa]"``` 25 | 26 | Ustawia nazwę którą chcesz dołączyć do wysyłanych commitów 27 | 28 | 29 | ```$ git config --global user.email "[adres email]"``` 30 | 31 | Ustawia email który chcesz dołączyć do wysyłanych commitów 32 | 33 | 34 | ## Tworzenie repozytorium 35 | Tworzy nowe repozytorium lub uzyskuje je z istniejącego adresu URL 36 | 37 | 38 | ```$ git init [nazwa-projektu]``` 39 | 40 | Tworzy nowe lokalne repozytorium ze sprecyzowaną nazwą 41 | 42 | 43 | ```$ git clone [url]``` 44 | 45 | Pobiera projekt i całą jego historię wersji 46 | 47 | {% endcapture %} 48 |
49 | {{ colOne | markdownify }} 50 |
51 | 52 | 53 | {% capture colTwo %} 54 | 55 | ## Wprowadzanie zmian 56 | Sprawdź zmiany i utwórz commit 57 | 58 | 59 | ```$ git status``` 60 | 61 | Wyświetla wszystkie nowe lub zmodyfikowane pliki do zatwierdzenia 62 | 63 | 64 | ```$ git diff``` 65 | 66 | Pokazuje różnice w plikach które nie zostały jeszcze zatwierdzone 67 | 68 | 69 | ```$ git add [plik]``` 70 | 71 | Zatwierdza pliki w celu przygotowania wersji 72 | 73 | 74 | ```$ git diff --staged``` 75 | 76 | Pokazuje różnicę pomiędzy plikami zatwierdzonymi a ich ostatnią wersją 77 | 78 | 79 | ```$ git reset [plik]``` 80 | 81 | Wycofuje plik lecz nie zmieniaj jego zawartości 82 | 83 | 84 | ```$ git commit -m"[descriptive message]"``` 85 | 86 | Permanentnie zapisuje zatwierdzone pliki w historii wersji 87 | 88 | ## Zmiany grupowe 89 | Nazwij serie commitów i podsumuj ukończone zadania 90 | 91 | 92 | ```$ git branch``` 93 | 94 | Wyświetla listę wszystkich lokalnych gałęzi w aktualnym repozytorium 95 | 96 | 97 | ```$ git branch [nazwa-gałęzi]``` 98 | 99 | Tworzy nową gałąź 100 | 101 | 102 | ```$ git switch -c [nazwa-gałęzi]``` 103 | 104 | Przechodzi do określonej gałęzi i aktualizuje katalog roboczy 105 | 106 | 107 | ```$ git merge [nazwa-gałęzi]``` 108 | 109 | Łączy historię określonej gałęzi z aktualną 110 | 111 | 112 | ```$ git branch -d [nazwa-gałęzi]``` 113 | 114 | Usuwa określoną gałąź 115 | {% endcapture %} 116 |
117 | {{ colTwo | markdownify }} 118 |
119 |
120 | 121 | 122 | {% capture colThree %} 123 | ## Zmiany w nazwach plików 124 | Przenieś i usuń pliki w repozytorium 125 | 126 | 127 | ```$ git rm [plik]``` 128 | 129 | Usuwa plik z katalogu roboczego i zatwierdza usunięcie 130 | 131 | 132 | ```$ git rm --cached [plik]``` 133 | 134 | Usuwa plik z kontroli wersji lecz zachowuje go lokalnie 135 | 136 | 137 | ```$ git mv [oryginalny-plik] [plik-ze-zmienioną-nazwą]``` 138 | 139 | Zmienia nazwę pliku i przygotowuje go do commitu 140 | 141 | ## Pomiń śledzenie 142 | Wyklucz pliki tymczasowe i ścieżki 143 | 144 | ``` 145 | *.log 146 | build/ 147 | temp-* 148 | ``` 149 | 150 | Plik tekstowy nazwany `.gitignore` wyklucza przypadkowe dodanie do repozytorium plików i ścieżek pasujących do określonych wzorów 151 | 152 | 153 | ```$ git ls-files --others --ignored --exclude-standard``` 154 | 155 | Wyświetla wszystkie ignorowane pliki w tym projekcie 156 | 157 | ## Zapisuj fragmenty 158 | Zapisuj i przywracaj niedokończone zmiany 159 | 160 | 161 | ```$ git stash``` 162 | 163 | Czasowo zachowuje wszystkie zmodyfikowane śledzone pliki 164 | 165 | 166 | ```$ git stash pop``` 167 | 168 | Przywraca najnowsze zachowane pliki 169 | 170 | 171 | ```$ git stash list``` 172 | 173 | Wyświetla listę wszystkich zachowanych zestawów zmian 174 | 175 | 176 | ```$ git stash drop``` 177 | 178 | Odrzuca najnowsze zachowane zmiany 179 | {% endcapture %} 180 |
181 | {{ colThree | markdownify }} 182 |
183 | 184 | {% capture colFour %} 185 | ## Przejrzyj historię 186 | Przejrzyj i sprawdź ewolucje plików projektu 187 | 188 | 189 | ```$ git log``` 190 | 191 | Wyświetla listę wersji dla aktualnej gałęzi 192 | 193 | 194 | ```$ git log --follow [plik]``` 195 | 196 | Wyświetla historie wersji pliku w tym zmiany nazw 197 | 198 | 199 | ```$ git diff [pierwsza-gałąź]...[druga-gałąź]``` 200 | 201 | Pokazuje różnicę pomiędzy dwoma gałęziami 202 | 203 | 204 | ```$ git show [commit]``` 205 | 206 | Wyświetla metadane i zmiany zawartości danego commitu 207 | 208 | ## Przywróć commity 209 | Wymaż błędy i historię zmian 210 | 211 | 212 | ```$ git reset [commit]``` 213 | 214 | Cofa wszystkie commity po `[commit]`, zachowując zmiany lokalne 215 | 216 | 217 | ```$ git reset --hard [commit]``` 218 | 219 | Odrzuca całą historię i zmiany wracając do danego commitu 220 | 221 | ## Synchronizuj dane 222 | Zarejestruj zdalne repozytorium (URL) i wymień się z nim historią 223 | 224 | 225 | ```$ git fetch [remote]``` 226 | 227 | Pobiera całą historię ze zdalnego repozytorium 228 | 229 | 230 | ```$ git merge [remote]/[gałąź]``` 231 | 232 | Łączy gałąź zdalną z lokalną 233 | 234 | 235 | ```$ git push [remote] [gałąź]``` 236 | 237 | Przesyła lokalną gałąź do GitHuba 238 | 239 | 240 | ```$ git pull``` 241 | 242 | Pobiera historię i wprowadza zmiany 243 | {% endcapture %} 244 |
245 | {{ colFour | markdownify }} 246 |
247 | -------------------------------------------------------------------------------- /downloads/pt_BR/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: Folha de Dicas de Git do GitHub (pt-BR) 5 | byline: Git é um sistema de controle de versão distribuído open source que facilita ações com o GitHub em seu notebook ou desktop. Esta folha de dicas resume instruções comumente usadas via linha de comando do Git para referência rápida. 6 | leadingpath: ../../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Instale o Git 11 | GitHub fornece clientes desktop que incluem uma interface gráfica para as ações mais comuns em um repositório e atualiza automaticamente para a linha de comando do Git para cenários avançados. 12 | 13 | ### GitHub para Windows 14 | [windows.github.com](https://windows.github.com) 15 | 16 | ### GitHub para Mac 17 | [mac.github.com](https://mac.github.com) 18 | 19 | Distribuições do Git para Linux e sistemas POSIX são disponíveis no site oficial do Git SCM. 20 | 21 | ### Git para todas as plataformas 22 | [git-scm.com](https://git-scm.com) 23 | 24 | ## Configure a ferramenta 25 | Configure informações de usuário para todos os repositórios locais 26 | 27 | 28 | ```$ git config --global user.name "[nome]"``` 29 | 30 | Configura o nome que você quer ligado às suas transações de commit 31 | 32 | 33 | ```$ git config --global user.email "[endereco-de-email]"``` 34 | 35 | Configura o email que você quer ligado às suas transações de commit 36 | 37 | 38 | ## Crie repositórios 39 | Inicie um novo repositório ou obtenha de uma URL existente 40 | 41 | 42 | ```$ git init [nome-do-projeto]``` 43 | 44 | Cria um novo repositório local com um nome especificado 45 | 46 | 47 | ```$ git clone [url]``` 48 | 49 | Baixa um projeto e seu histórico de versão inteiro 50 | 51 | {% endcapture %} 52 |
53 | {{ colOne | markdownify }} 54 |
55 | 56 | {% capture colTwo %} 57 | 58 | ## Faça mudanças 59 | Revise edições e crie uma transação de commit 60 | 61 | ```$ git status``` 62 | 63 | Lista todos os arquivos novos ou modificados para serem commitados 64 | 65 | 66 | ```$ git diff``` 67 | 68 | Mostra diferenças no arquivo que ainda não foram preparadas 69 | 70 | 71 | ```$ git add [arquivo]``` 72 | 73 | Faz o snapshot de um arquivo na preparação para versionamento 74 | 75 | 76 | ```$ git diff --staged``` 77 | 78 | Mostra a diferença entre arquivos preparados e suas últimas versões 79 | 80 | 81 | ```$ git reset [arquivo]``` 82 | 83 | Retira o arquivo da área de preparação, mas preserva seu conteúdo 84 | 85 | 86 | ```$ git commit -m "[mensagem descritiva]"``` 87 | 88 | Grava o snapshot permanentemente do arquivo no histórico de versão 89 | 90 | ## Mudanças em grupo 91 | Nomeie uma série de commits e combine os esforços completos 92 | 93 | 94 | ```$ git branch``` 95 | 96 | Lista todos os branches locais no repositório atual 97 | 98 | 99 | ```$ git branch [nome-do-branch]``` 100 | 101 | Cria um novo branch 102 | 103 | 104 | ```$ git switch -c [nome-do-branch]``` 105 | 106 | Muda para o branch especificado e atualiza o diretório de trabalho 107 | 108 | 109 | ```$ git merge [nome-do-branch]``` 110 | 111 | Combina o histórico do branch especificado ao branch atual 112 | 113 | 114 | ```$ git branch -d [nome-do-branch]``` 115 | 116 | Exclui o branch especificado 117 | {% endcapture %} 118 |
119 | {{ colTwo | markdownify }} 120 |
121 |
122 | 123 | {% capture colThree %} 124 | ## Refatore nomes de arquivos 125 | Mude e remova os arquivos versionados 126 | 127 | 128 | ```$ git rm [arquivo]``` 129 | 130 | Remove o arquivo do diretório de trabalho e o prepara a remoção 131 | 132 | 133 | ```$ git rm --cached [arquivo]``` 134 | 135 | Remove o arquivo do controle de versão mas preserva o arquivo localmente 136 | 137 | 138 | ```$ git mv [arquivo-original] [arquivo-renomeado]``` 139 | 140 | Muda o nome do arquivo e o prepara para o commit 141 | 142 | ## Suprima o monitoramento 143 | Ignore arquivos e diretórios temporários 144 | 145 | ``` 146 | *.log 147 | build/ 148 | temp-* 149 | ``` 150 | 151 | Um arquivo de texto chamado `.gitignore` suprime o versionamento acidental de arquivos e diretórios correspondentes aos padrões especificados 152 | 153 | 154 | ```$ git ls-files --others --ignored --exclude-standard``` 155 | 156 | Lista todos os arquivos ignorados neste projeto 157 | 158 | ## Salve fragmentos 159 | Arquive e restaure mudanças incompletas 160 | 161 | 162 | ```$ git stash``` 163 | 164 | Armazena temporariamente todos os arquivos monitorados modificados 165 | 166 | 167 | ```$ git stash pop``` 168 | 169 | Restaura os arquivos recentes em stash 170 | 171 | 172 | ```$ git stash list``` 173 | 174 | Lista todos os conjuntos de alterações em stash 175 | 176 | 177 | ```$ git stash drop``` 178 | 179 | Descarta os conjuntos de alterações mais recentes em stash 180 | 181 | {% endcapture %} 182 |
183 | {{ colThree | markdownify }} 184 |
185 | 186 | {% capture colFour %} 187 | ## Revise o histórico 188 | Navegue e inspecione a evolução dos arquivos do projeto 189 | 190 | 191 | ```$ git log``` 192 | 193 | Lista o histórico de versões para o branch atual 194 | 195 | 196 | ```$ git log --follow [arquivo]``` 197 | 198 | Lista o histórico de versões para um arquivo, incluindo mudanças de nome 199 | 200 | 201 | ```$ git diff [primerio-branch]...[segundo-branch]``` 202 | 203 | Mostra a diferença de conteúdo entre dois branches 204 | 205 | 206 | ```$ git show [commit]``` 207 | 208 | Retorna mudanças de metadata e conteúdo para o commit especificado 209 | 210 | ## Desfaça commits 211 | Apague enganos e crie um histórico substituto 212 | 213 | 214 | ```$ git reset [commit]``` 215 | 216 | Desfaz todos os commits depois de `[commit]`, preservando mudanças locais 217 | 218 | 219 | ```$ git reset --hard [commit]``` 220 | 221 | Descarta todo histórico e mudanças para o commit especificado 222 | 223 | ## Sincronize mudanças 224 | Registre um repositório remoto e troque o histórico de versão 225 | 226 | 227 | ```$ git fetch [nome-remoto]``` 228 | 229 | Baixe todo o histórico de um repositório remoto 230 | 231 | 232 | ```$ git merge [nome-remoto]/[branch]``` 233 | 234 | Combina o branch remoto ao branch local atual 235 | 236 | 237 | ```$ git push [alias] [branch]``` 238 | 239 | Envia todos os commits do branch local para o GitHub 240 | 241 | 242 | ```$ git pull``` 243 | 244 | Baixa o histórico e incorpora as mudanças 245 | 246 | {% endcapture %} 247 |
248 | {{ colFour | markdownify }} 249 |
250 | -------------------------------------------------------------------------------- /downloads/pt_BR/github-git-cheat-sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/training-kit/a50017c8aaa942a9535b73bf55191c22bd8a60b3/downloads/pt_BR/github-git-cheat-sheet.pdf -------------------------------------------------------------------------------- /downloads/pt_PT/github-git-cheat-sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github/training-kit/a50017c8aaa942a9535b73bf55191c22bd8a60b3/downloads/pt_PT/github-git-cheat-sheet.pdf -------------------------------------------------------------------------------- /downloads/ru/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: Шпаргалка по Git от GitHub 5 | byline: Git - это распределённая система контроля версий с открытым исходным кодом, которая используется для работы с GitHub на вашем компьютере. В этой записке содержится описание основных команд Git для командной строки и инструкции по их применению. 6 | leadingpath: ../../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Установка Git 11 | GitHub предоставляет оконное приложение с графическим интерфейсом для выполнения основных операций с репозиторием, и 12 | консольную версию Git с автоматическими обновлениями для расширенных сценариев работы. 13 | 14 | ### GitHub Desktop 15 | [desktop.github.com](https://desktop.github.com) 16 | 17 | Дистрибутивы Git для систем Linux и POSIX доступны на официальном сайте Git SCM. 18 | 19 | ### Git для всех платформ 20 | [git-scm.com](https://git-scm.com) 21 | 22 | ## Первоначальная настройка 23 | Настройка информации о пользователе для всех локальных репозиториев 24 | 25 | ```$ git config --global user.name "[имя]"``` 26 | 27 | Устанавливает имя, которое будет отображаться в поле автора у выполняемых вами коммитов 28 | 29 | 30 | ```$ git config --global user.email "[адрес электронной почты]"``` 31 | 32 | Устанавливает адрес электронной почты, который будет отображаться в информации о выполняемых вами коммитах 33 | 34 | 35 | ## Создание репозитория 36 | Создание нового репозитория или получение его по существующему URL-адресу 37 | 38 | 39 | ```$ git init [название проекта]``` 40 | 41 | Создаёт новый локальный репозиторий с заданным именем 42 | 43 | 44 | ```$ git clone [url-адрес]``` 45 | 46 | Скачивает репозиторий вместе со всей его историей изменений 47 | 48 | {% endcapture %} 49 |
50 | {{ colOne | markdownify }} 51 |
52 | 53 | 54 | {% capture colTwo %} 55 | 56 | ## Внесение изменений 57 | Просмотр изменений и создание коммитов (фиксация изменений) 58 | 59 | 60 | ```$ git status``` 61 | 62 | Перечисляет все новые или изменённые файлы, которые нуждаются в фиксации 63 | 64 | 65 | ```$ git diff``` 66 | 67 | Показывает различия по внесённым изменениям в ещё не проиндексированных файлах 68 | 69 | 70 | ```$ git add [файл]``` 71 | 72 | Индексирует указанный файл для последующего коммита 73 | 74 | 75 | ```$ git diff --staged``` 76 | 77 | Показывает различия между проиндексированной и последней зафиксированной версиями файлов 78 | 79 | 80 | ```$ git reset [файл]``` 81 | 82 | Отменяет индексацию указанного файла, при этом сохраняет его содержимое 83 | 84 | 85 | ```$ git commit -m "[сообщение с описанием]"``` 86 | 87 | 88 | Фиксирует проиндексированные изменения и сохраняет их в историю версий 89 | 90 | ## Коллективная работа 91 | Именованные серии коммитов и соединение результатов работы 92 | 93 | 94 | ```$ git branch``` 95 | 96 | Список именованных веток коммитов с указанием выбранной ветки 97 | 98 | 99 | ```$ git branch [имя ветки]``` 100 | 101 | Создаёт новую ветку 102 | 103 | 104 | ```$ git switch -c [имя ветки]``` 105 | 106 | Переключается на выбранную ветку и обновляет рабочую директорию до её состояния 107 | 108 | 109 | ```$ git merge [имя ветки]``` 110 | 111 | Вносит изменения указанной ветки в текущую ветку 112 | 113 | 114 | ```$ git branch -d [имя ветки]``` 115 | 116 | Удаляет выбранную ветку 117 | 118 | {% endcapture %} 119 |
120 | {{ colTwo | markdownify }} 121 |
122 |
123 | 124 | 125 | {% capture colThree %} 126 | ## Операции с файлами 127 | Перемещение и удаление версий файлов репозитория 128 | 129 | 130 | ```$ git rm [файл]``` 131 | 132 | Удаляет конкретный файл из рабочей директории и индексирует его удаление 133 | 134 | 135 | ```$ git rm --cached [файл]``` 136 | 137 | Убирает конкретный файл из контроля версий, но физически оставляет его на своём месте 138 | 139 | 140 | ```$ git mv [оригинальный файл] [новое имя]``` 141 | 142 | Перемещает и переименовывает указанный файл, сразу индексируя его для последующего коммита 143 | 144 | ## Игнорирование некоторых файлов 145 | Исключение временных и вторичных файлов и директорий 146 | 147 | ``` 148 | *.log 149 | build/ 150 | temp-* 151 | ``` 152 | 153 | Git будет игнорировать файлы и директории, перечисленные в файле `.gitignore` с помощью wildcard синтаксиса 154 | 155 | 156 | ```$ git ls-files --others --ignored --exclude-standard``` 157 | 158 | Список всех игнорируемых файлов в текущем проекте 159 | 160 | ## Сохранение фрагментов 161 | Сохранение и восстановление незавершённых изменений 162 | 163 | 164 | ```$ git stash``` 165 | 166 | Временно сохраняет все незафиксированные изменения отслеживаемых файлов 167 | 168 | 169 | ```$ git stash pop``` 170 | 171 | Восстанавливает состояние ранее сохранённых версий файлов 172 | 173 | 174 | ```$ git stash list``` 175 | 176 | Выводит список всех временных сохранений 177 | 178 | 179 | ```$ git stash drop``` 180 | 181 | Сбрасывает последние временно сохранённыe изменения 182 | 183 | {% endcapture %} 184 |
185 | {{ colThree | markdownify }} 186 |
187 | 188 | {% capture colFour %} 189 | ## Просмотр истории 190 | Просмотр и изучение истории изменений файлов проекта 191 | 192 | 193 | ```$ git log``` 194 | 195 | История коммитов для текущей ветки 196 | 197 | 198 | ```$ git log --follow [файл]``` 199 | 200 | История изменений конкретного файла, включая его переименование 201 | 202 | 203 | ```$ git diff [первая ветка]...[вторая ветка]``` 204 | 205 | Показывает разницу между содержанием коммитов двух веток 206 | 207 | 208 | ```$ git show [коммит]``` 209 | 210 | Выводит информацию и показывает изменения в выбранном коммите 211 | 212 | ## Откат коммитов 213 | Удаление ошибок и корректировка созданной истории 214 | 215 | 216 | ```$ git reset [коммит]``` 217 | 218 | Отменяет все коммиты после заданного, оставляя все изменения в рабочей директории 219 | 220 | 221 | ```$ git reset --hard [коммит]``` 222 | 223 | Сбрасывает всю историю вместе с состоянием рабочей директории до указанного коммита. 224 | 225 | ## Синхронизация с удалённым репозиторием 226 | Регистрация удалённого репозитория и обмен изменениями 227 | 228 | 229 | ```$ git fetch [удалённый репозиторий]``` 230 | 231 | Скачивает всю историю из удалённого репозитория 232 | 233 | 234 | ```$ git merge [удалённый репозиторий]/[ветка]``` 235 | 236 | Вносит изменения из ветки удалённого репозитория в текущую ветку локального репозитория 237 | 238 | 239 | ```$ git push [удалённый репозиторий] [ветка]``` 240 | 241 | Загружает все изменения локальной ветки в удалённый репозиторий 242 | 243 | 244 | ```$ git pull``` 245 | 246 | Загружает историю из удалённого репозитория и объединяет её с локальной. pull = fetch + merge 247 | 248 | {% endcapture %} 249 |
250 | {{ colFour | markdownify }} 251 |
252 | -------------------------------------------------------------------------------- /downloads/sk/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Git Cheat Sheet 5 | byline: Git je open-source distribuovaný systém riadenia revízií. GitHub je služba, na ktorej je možný hosting pre tieto revízie (repozitáre, projekty). Tento cheat sheet sumarizuje bežne používané Git príkazy pre rýchlu referenciu. 6 | leadingpath: ../../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Inštalácia Gitu 11 | GitHub ponúka aplikácie pre najbežnejšie operácie s repozitármi alebo rozhranie v príkazovom riadku pre zložitejšie situácie. 12 | 13 | ### GitHub pre Windows a Mac 14 | [desktop.github.com](https://desktop.github.com/) 15 | 16 | Git distribúcie pre Linux a POSIX systémy sú dostupné na oficiálnych stránkach Git SCM. 17 | 18 | ### Git pre všetky platformy 19 | [git-scm.com](https://git-scm.com) 20 | 21 | ## Konfigurácia 22 | Konfigurácia používateľských informácií na zariadení. 23 | 24 | ```$ git config --global user.name "[meno]"``` 25 | 26 | Nastaví meno, ktoré bude priradené ku commitom 27 | 28 | 29 | ```$ git config --global user.email "[email]"``` 30 | 31 | Nastaví e-mail, ktorý bude priradený ku commitom 32 | 33 | ```$ git config --global color.ui auto``` 34 | 35 | Umožní farebné zvýrazňovanie výstupov z príkazového riadku 36 | 37 | 38 | ## Vytváranie repozitárov 39 | Vytváranie nového repozitára alebo používanie už existujúceho 40 | 41 | 42 | ```$ git init [nazov-projektu]``` 43 | 44 | Vytvorí nový lokálny repozitár s daným názvom 45 | 46 | 47 | ```$ git clone [url]``` 48 | 49 | Stiahne celý repozitár z danej URL 50 | 51 | {% endcapture %} 52 |
53 | {{ colOne | markdownify }} 54 |
55 | 56 | 57 | {% capture colTwo %} 58 | 59 | ## Robenie zmien 60 | Zrevidovanie zmien a robenie ďalších 61 | 62 | 63 | ```$ git status``` 64 | 65 | Vráti zoznam všetkých nových alebo upravených súborov 66 | 67 | 68 | ```$ git diff``` 69 | 70 | Ukáže rozdiely v súboroch, ktoré ešte neboli stage-nuté 71 | 72 | 73 | ```$ git add [subor]``` 74 | 75 | Pridá súbor do "poolu" pre nový commit 76 | 77 | 78 | ```$ git diff --staged``` 79 | 80 | Ukáže rozdiely v súboroch medzi stage-nutou a poslednou verziou 81 | 82 | 83 | ```$ git reset [subor]``` 84 | 85 | Unstage-ne súbor, ale zachová jeho obsah 86 | 87 | 88 | ```$ git commit -m"[vystizny-opis-zmien]"``` 89 | 90 | Vytvorí commit a pridá k nemu správu s opisom zmien, ktoré boli urobené 91 | 92 | ## Skupinové zmeny 93 | Pomenovanie série commitov a kombinovanie progresu 94 | 95 | 96 | ```$ git branch``` 97 | 98 | Vráti zoznam všetkých lokálnych vetiev v repozitári 99 | 100 | 101 | ```$ git branch [nazov-vetvy]``` 102 | 103 | Vytvorí novú vetvu 104 | 105 | 106 | ```$ git switch -c [nazov-vetvy]``` 107 | 108 | Prejde do danej vetvy a aktualizuje súbory 109 | 110 | 111 | ```$ git merge [nazov-vetvy]``` 112 | 113 | Zlúči históriu danej vetvy do súčasnej vetvy 114 | 115 | 116 | ```$ git branch -d [nazov-vetvy]``` 117 | 118 | Zmaže vetvu 119 | {% endcapture %} 120 |
121 | {{ colTwo | markdownify }} 122 |
123 |
124 | 125 | 126 | {% capture colThree %} 127 | ## Premiestňovanie súborov 128 | Premiestnenie alebo zmazanie verzovaných súborov 129 | 130 | 131 | ```$ git rm [subor]``` 132 | 133 | Zmaže súbor z priečinka a zaznamená, že bol zmazaný 134 | 135 | 136 | ```$ git rm --cached [subor]``` 137 | 138 | Odstráni súbor z verzovacieho systému, ale zachová súbor lokálne 139 | 140 | 141 | ```$ git mv [originalny-subor] [premenovany-subor]``` 142 | 143 | Zmení názov súboru a pripraví súbor na commit 144 | 145 | ## Zakázanie verzovania 146 | Vynechanie súborov, ktoré nechceme verzovať alebo dočasných súborov 147 | 148 | ``` 149 | *.log 150 | build/ 151 | temp-* 152 | ``` 153 | 154 | Textový súbor nazvaný `.gitignore` zakáže verzovanie nechcených súborov alebo priečinkov (väčšinou napr. súbory IDE, heslá). 155 | 156 | 157 | ```$ git ls-files --others --ignored --exclude-standard``` 158 | 159 | Vráti zoznam všetkých ignorovaných súborov v projekte 160 | 161 | ## Ukladanie menších zmien 162 | Uloženie a obnovenie nedokončených zmien 163 | 164 | 165 | ```$ git stash``` 166 | 167 | Dočasne uloží všetky zmenené súbory 168 | 169 | 170 | ```$ git stash pop``` 171 | 172 | Obnoví posledne stashnuté (uložené) súbory 173 | 174 | 175 | ```$ git stash list``` 176 | 177 | Vráti zoznam všetkých stashnutých (uložených) zmien 178 | 179 | 180 | ```$ git stash drop``` 181 | 182 | Zahodí posledne stashnuté (uložené) zmeny 183 | {% endcapture %} 184 |
185 | {{ colThree | markdownify }} 186 |
187 | 188 | {% capture colFour %} 189 | ## Revidovanie histórie 190 | Listovanie a kontrola vývoja súborov 191 | 192 | 193 | ```$ git log``` 194 | 195 | Vráti zoznam commitov v aktuálnej vetve 196 | 197 | 198 | ```$ git log --follow [subor]``` 199 | 200 | Vráti zoznam zmien pre daný súbor (zahŕňajúc premenovávania) 201 | 202 | 203 | ```$ git diff [jedna-vetva]...[druha-vetva]``` 204 | 205 | Zobrazí rozdiely medzi dvoma vetvami 206 | 207 | 208 | ```$ git show [commit]``` 209 | 210 | Vráti metadáta a obsah zmien daného commitu 211 | 212 | ## Vrátenie zmien 213 | Napravenie chýb a nahradenie histórie 214 | 215 | 216 | ```$ git reset [commit]``` 217 | 218 | Vráti všetky urobené zmeny až po daný commit, zachovajúc lokálne zmeny 219 | 220 | 221 | ```$ git reset --hard [commit]``` 222 | 223 | Zahodí všetky urobené zmeny až po daný commit 224 | 225 | ## Synchronizácia zmien 226 | Zapísanie zmien a stiahnutie alebo nahratie zmien 227 | 228 | 229 | ```$ git fetch [remote]``` 230 | 231 | Stiahne všetky zmeny zo vzdialeného do lokálneho repozitára 232 | 233 | 234 | ```$ git merge [remote]/[branch]``` 235 | 236 | Zlúči danú vetvu do súčasnej 237 | 238 | 239 | ```$ git push [remote] [branch]``` 240 | 241 | Nahrá commity a zmeny do danej vetvy na GitHub 242 | 243 | 244 | ```$ git pull``` 245 | 246 | Stiahne všetky aktuálne zmeny a históriu kódu 247 | {% endcapture %} 248 |
249 | {{ colFour | markdownify }} 250 |
251 | -------------------------------------------------------------------------------- /downloads/subversion-migration.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: Subversion to Git Migration 5 | byline: When migrating from Subversion to Git, there’s a vocabulary and command set to learn, in addition to the new capabilities only afforded by Git. This cheat sheet aims to help you in your transition between the classic Subversion technology and the modern use of Git with the GitHub collaboration platform. 6 | leadingpath: ../../ 7 | --- 8 | 9 | {% capture migration %} 10 | ## Migrating 11 | 12 | 13 | ### GitHub importer 14 | 15 | For Internet-accessible projects, GitHub.com provides Importer for automatic migration and repository creation from Subversion, Team Foundation Server, Mercurial, or alternatively-hosted Git version controlled projects. 16 | 17 | The process is as simple, needing only you to sign into your GitHub account, if you aren’t already, entering your existing project’s version control URL in the repository field, and initiating the conversion. 18 | 19 | Depending on the detected version control system, Importer may request additional information for migration. This includes a mapping file for associating Subversion usernames with Git fields. 20 | 21 | Read more about how to import your project into GitHub by looking at the full [GitHub Importer documentation](https://docs.github.com/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-repository-with-github-importer). 22 | 23 | ### SVN2Git Utility 24 | 25 | When access limitations or non-public Subversion repositories need porting to Git, the SVN2Git utility is the command line utility of choice and provides control through every step of the process. 26 | 27 | Subversion presents distinct differences in structure to that of a Git repository, and SVN2Git provides the flexibility and configuration for traditional and custom Subversion layouts. This ensures the resulting Git repository aligns with standard best practices for commits, branches, and tags for the entire project’s history. 28 | 29 | Notable features of SVN2Git include: 30 | 31 | - Converting all SVN conventions to traditional Git structure 32 | - Providing SVN users field to name and email data in Git commits 33 | - Permitting exclusion patterns for precise Git repository content 34 | 35 | Learn more about SVN2Git at the project’s official home page: 36 | 37 | [https://github.com/nirvdrum/svn2git](https://github.com/nirvdrum/svn2git) 38 | {% endcapture %} 39 | 40 |
41 | {{ migration | markdownify }} 42 |
43 | 44 | {% capture bridging %} 45 | ## Bridging 46 | 47 | ### Leveraging Git’s support of SVN 48 | 49 | Often times, during a transition to Git, the Subversion infrastructure remains in place while users become acquainted with local Git repository interactions, local workflows, and desktop applications. 50 | 51 | The `git svn` command permits users to synchronize with a centralized Subversion repository host while taking advantage of all the benefits local Git command line and graphical clients have to offer. 52 | 53 | To acquire a Subversion repository as a resulting local Git repository, download the project in its entirety with this command: 54 | 55 | ``` 56 | git svn clone [svn-repo-url] --stdlayout 57 | ``` 58 | 59 | Make certain you are familiar with the targeted Subversion repository’s structure and whether it follows the standard layout or not. For non-traditional `trunk`, `branches`, and `tags` layouts, the following option switches should be specified during the `svn clone`: 60 | 61 | - `T [trunk]` for alternate main source convention 62 | - `b [branches]` for alternate branch location 63 | - `t [tags]` for alternate tag structure location 64 | 65 | Once the clone operation completes, you can proceed with any local Git interactions on the command line or with graphical clients. 66 | 67 | ### Synchronizing with Subversion 68 | 69 | Publishing local Git history back to a central Subversion repository acquired with git svn clone is performed with one command: 70 | 71 | ``` 72 | git svn dcommit 73 | ``` 74 | 75 | If the hosted Subversion repository’s history possesses commits not yet in the local Git repository, the `dcommit` operation will be rejected until the commits are acquired with this command: 76 | 77 | ``` 78 | git svn rebase 79 | ``` 80 | 81 | Keep in mind this action rewrites your local Git history and your commit identifiers will be different. 82 | {% endcapture %} 83 | 84 |
85 | {{ bridging | markdownify }} 86 |
87 | 88 | 89 | ## Understanding 90 | 91 | Subversion and Git share similar vocabularies, but the commonality often is only is command names. Behavior and functionality are quite distinct given the unique qualities Git provides as a distributed version control system when compared to the centralized aspects of Subversion. 92 | 93 | 94 | | SVN command | Git command | Git behavior | 95 | | --- | --- | --- | 96 | | `status` | `status` | Report the state of working tree | 97 | | `add` | `add` | Required for each path before making a commit | 98 | | `commit` | `commit` | Store prepared changes in local revision history | 99 | | `rm`, `delete` | `rm` | Prepare paths for deletion in next commit | 100 | | `move` | `mv` | Prepare relocated content for next commit | 101 | | `checkout` | `clone` | Acquire the entire history of a project locally for the first time | 102 | | | `branch` | Create local context for commits | 103 | | | `merge` | Join branch histories and changes to working tree | 104 | | | `log` | No network required | 105 | | | `push` | Upload commit history to GitHub/centralized Git host | 106 | | | `pull` | Download and integrate GitHub repository history with local on | 107 | | | `fetch` | Download GitHub repository history with no other action | 108 | -------------------------------------------------------------------------------- /downloads/tr/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Git Başvuru Sayfası 5 | byline: Git, dizüstünüzde veya masaüstünüzdeki GitHub etkinliklerini kolaylaştıran, açık kaynaklı dağıtık sürüm kontrol sistemidir. Bu sayfa, hızlı başvuru için sık kullanılan Git komut satırı talimatlarını özetler. 6 | leadingpath: ../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Git'i Yükleyin 11 | GitHub, en yaygın depo eylemleri için grafiksel bir kullanıcı arabirimi ve Git'in gelişmiş senaryolar için otomatik olarak güncellenen bir komut satırı sürümü içeren masaüstü istemcileri sağlar. 12 | 13 | ### GitHub Masaüstü 14 | [desktop.github.com](https://desktop.github.com) 15 | 16 | Linux ve POSIX sistemleri için Git dağıtımlarını resmi Git SCM web sitesinde bulabilirsiniz. 17 | 18 | ### Tüm platformlar için Git 19 | [git-scm.com](https://git-scm.com) 20 | 21 | ## Takım yapılandırma 22 | Tüm yerel depolar için kullanıcı bilgilerini yapılandırın 23 | 24 | ```$ git config --global user.name "[name]"``` 25 | 26 | Tüm yerel depolar için kullanıcı bilgilerini yapılandırın 27 | 28 | 29 | 30 | ```$ git config --global user.email "[email address]"``` 31 | 32 | Tüm yerel depolar için eposta bilgilerini yapılandırın 33 | 34 | 35 | ## Depolar oluşturun 36 | Yeni bir depo başlatın veya mevcut bir URL’den bir tane edinin 37 | 38 | 39 | ```$ git init [project-name]``` 40 | 41 | Belirtilen adla yeni bir yerel depo oluşturur 42 | 43 | 44 | ```$ git clone [url]``` 45 | 46 | Bir projeyi ve tüm sürüm geçmişini indirin 47 | 48 | {% endcapture %} 49 |
50 | {{ colOne | markdownify }} 51 |
52 | 53 | 54 | {% capture colTwo %} 55 | 56 | ## Değişiklik yapmak 57 | Düzenlemeleri inceleyin ve bir işlem gerçekleştirin 58 | 59 | 60 | ```$ git status``` 61 | 62 | Taahhüt edilecek tüm yeni veya değiştirilmiş dosyaları listeler 63 | 64 | 65 | ```$ git diff``` 66 | 67 | Henüz aşamalandırılmamış dosya farklarını gösterir 68 | 69 | 70 | ```$ git add [file]``` 71 | 72 | Sürüm hazırlığı için dosyanın anlık görüntüsünü al. 73 | 74 | 75 | ```$ git diff --staged``` 76 | 77 | Hazırlama ve son dosya sürümü arasındaki dosya farklarını gösterir. 78 | 79 | 80 | ```$ git reset [file]``` 81 | 82 | Dosyayı dizinden kaldırır ama içeriği korur. 83 | 84 | 85 | ```$ git commit -m"[descriptive message]"``` 86 | 87 | Sürüm geçmişinde dosya anlık görüntülerini kalıcı olarak kaydeder 88 | 89 | ## Grup değişiklikleri 90 | Bir dizi taahhüt adı verin ve daha önce tamamlanmış olan çabaları birleştirin 91 | 92 | 93 | ```$ git branch``` 94 | 95 | Geçerli depodaki tüm yerel dalları listeler 96 | 97 | 98 | ```$ git branch [branch-name]``` 99 | 100 | Yeni bir dal oluştur 101 | 102 | 103 | ```$ git switch -c [branch-name]``` 104 | 105 | Belirtilen dala geçer ve çalışma dizinini günceller 106 | 107 | 108 | ```$ git merge [branch-name]``` 109 | 110 | Belirtilen dalın geçmişini mevcut dalla birleştirir 111 | 112 | 113 | ```$ git branch -d [branch-name]``` 114 | 115 | Belirtilen dalı siler 116 | {% endcapture %} 117 |
118 | {{ colTwo | markdownify }} 119 |
120 |
121 | 122 | 123 | {% capture colThree %} 124 | ## Dosya Yenileme 125 | Sürümlü dosyaları taşıma ve silme 126 | 127 | 128 | ```$ git rm [file]``` 129 | 130 | Dosyayı çalışma dizininden siler ve dizini günceller 131 | 132 | 133 | ```$ git rm --cached [file]``` 134 | 135 | Dosyayı sürüm kontrolünden kaldırır ancak dosyayı yerel olarak korur 136 | 137 | 138 | ```$ git mv [file-original] [file-renamed]``` 139 | 140 | Dosya adını değiştirir ve işleme için hazırlayın 141 | 142 | ## İzlemeyi bastır 143 | Geçici dosyaları ve yolları hariç tut 144 | 145 | ``` 146 | *.log 147 | build/ 148 | temp-* 149 | ``` 150 | 151 | `.Gitignore` adlı bir metin dosyası, belirtilen kalıplarla eşleşen dosya ve yolların yanlışlıkla sürümlendirilmesini bastırır. 152 | 153 | 154 | ```$ git ls-files --others --ignored --exclude-standard``` 155 | 156 | Bu projedeki yok sayılan tüm dosyaları listeler 157 | 158 | ## Parçaları kaydet 159 | Eksik değişiklikleri sakla ve geri yükle 160 | 161 | 162 | ```$ git stash``` 163 | 164 | Değiştirilmiş tüm sürüm dosyalarını geçici olarak kaydedin 165 | 166 | 167 | ```$ git stash pop``` 168 | 169 | En son saklanan dosyaları geri yükler 170 | 171 | 172 | ```$ git stash list``` 173 | 174 | Önbelleğe alınmış tüm değişiklikleri listeler 175 | 176 | 177 | ```$ git stash drop``` 178 | 179 | En son saklanan değişiklikleri atar 180 | {% endcapture %} 181 |
182 | {{ colThree | markdownify }} 183 |
184 | 185 | {% capture colFour %} 186 | ## Geçmişi incele 187 | Proje dosyalarının gelişimini izlemek ve incelemek 188 | 189 | 190 | ```$ git log``` 191 | 192 | Geçerli dalın sürüm geçmişini listeler 193 | 194 | 195 | ```$ git log --follow [file]``` 196 | 197 | Yeniden adlandırmalar dahil, dosyanın sürüm geçmişini listeler 198 | 199 | 200 | ```$ git diff [first-branch]...[second-branch]``` 201 | 202 | İki dal arasındaki içerik farklarını gösterir 203 | 204 | 205 | ```$ git show [commit]``` 206 | 207 | Belirtilen taahhüdün meta verilerini ve içerik değişikliklerini göster 208 | 209 | ## Tekrarlama işlemleri 210 | Hataları temizle ve değiştirme geçmişini yaz 211 | 212 | 213 | ```$ git reset [commit]``` 214 | 215 | Değişiklikleri yerel olarak koruyarak, `[taahhüt]` sonrasında verilen tüm taahhütleri geri alır. 216 | 217 | 218 | ```$ git reset --hard [commit]``` 219 | 220 | Tüm geçmişi iptal eder ve belirtilen taahhütte yapılan değişiklikleri geri alır 221 | 222 | ## Değişiklikleri eşle 223 | Bir uzaktan (URL) kaydedin ve depo geçmişini değiştirin 224 | 225 | 226 | ```$ git fetch [remote]``` 227 | 228 | Tüm geçmişi uzak depodan indirir 229 | 230 | 231 | ```$ git merge [remote]/[branch]``` 232 | 233 | Uzak dalı geçerli yerel dalla birleştirir 234 | 235 | 236 | ```$ git push [remote] [branch]``` 237 | 238 | Tüm yerel dal işlemlerini GitHub'a yükler 239 | 240 | 241 | ```$ git pull``` 242 | 243 | Yer imi geçmişini indirir ve değişiklikleri içerir 244 | {% endcapture %} 245 |
246 | {{ colFour | markdownify }} 247 |
248 | -------------------------------------------------------------------------------- /downloads/ua/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: Шпаргалка з Git від GitHub 5 | byline: Git - розподілена система контролю версій з відкритим кодом, що використовується GitHub. Ця шпаргалка коротко підсумовує найбільш поширені команди Git для швидкої довідки. 6 | leadingpath: ../../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## Встановлення 11 | 12 | ### GitHub Desktop 13 | [desktop.github.com](https://desktop.github.com) 14 | 15 | ### Git для всіх платформ 16 | [git-scm.com](https://git-scm.com) 17 | 18 | ## Налаштування інструментарію 19 | Налаштування інформації про користувача для всіх локальних репозиторіїв 20 | 21 | ```$ git config --global user.name "[ім'я]"``` 22 | 23 | Встановлює ім'я користувача, що буде вказано для всіх ваших комітів 24 | 25 | ```$ git config --global user.email "[поштова скринька]"``` 26 | 27 | Встановлює поштову скриньку, що буде вказана для всіх ваших комітів 28 | 29 | ```$ git config --global color.ui auto``` 30 | 31 | Додає допоміжне забарвлення виводу в командній стрічці 32 | 33 | ## Гілки 34 | 35 | Гілки (branches) - важлива частина роботи з Git. Всі коміти будуть додаватися на гілку, на якій ви наразі знаходитесь (checkout). `git status` підкаже поточну гілку. 36 | 37 | ```$ git branch [назва-гілки]``` 38 | 39 | Створює нову гілку 40 | 41 | ```$ git switch -c [назва-гілки]``` 42 | 43 | Переходить на вказану гілку і оновлює робочу директорію 44 | 45 | ```$ git merge [назва-гілки]``` 46 | 47 | Поєднує історію вказаної гілки з поточною. На GitHub операція інколи потребує запиту (pull request) 48 | 49 | ```$ git branch -d [назва-гілки]``` 50 | 51 | Видаляє вказану гілку 52 | 53 | {% endcapture %} 54 |
55 | {{ colOne | markdownify }} 56 |
57 | 58 | 59 | {% capture colTwo %} 60 | 61 | ## Створення репозиторіїв 62 | 63 | Для кожного репозиторію створення треба виконати лише один раз, на самому початку: локально створити і завантажити на GitHub, або клонувати існуючий репозиторій. 64 | 65 | ```$ git init``` 66 | 67 | Після виклику `git init`, створює посилання з локального репозиторію на пустий репозиторій на GitHub 68 | 69 | ```$ git remote add origin [посилання]``` 70 | 71 | Перетворює існуючу директорію на репозиторій Git 72 | 73 | ```$ git clone [посилання]``` 74 | 75 | Клонує (завантажує) існуючий репозиторій з GitHub, з усіма файлами, гілками і комітами 76 | 77 | ## Файл .gitignore 78 | 79 | Інколи з репозиторію Git варто виключити деякі файли. Це можна зробити, створивши спеціальний файл під назвою `.gitignore`. Корисні шаблони для `.gitignore` файлів можна знайти на [github.com/github/gitignore](https://github.com/github/gitignore). 80 | 81 | ## Синхронізація змін 82 | 83 | Синхронізація вашого локального репозиторію з репозиторієм на GitHub.com 84 | 85 | ```$ git fetch``` 86 | 87 | Завантажує всю історію з віддалених гілок 88 | 89 | ```$ git merge``` 90 | 91 | Поєднує віддалені гілки з поточною локальною гілкою 92 | 93 | ```$ git push``` 94 | 95 | Завантажує всі локальні зміни в гілках на GitHub 96 | 97 | ```$ git pull``` 98 | 99 | Оновлює локальну поточну гілку новими комітами з відповідної віддаленої гілки. `git pull` — це поєднання `git fetch` та `git merge` 100 | 101 | {% endcapture %} 102 |
103 | {{ colTwo | markdownify }} 104 |
105 |
106 | 107 | {% capture colThree %} 108 | 109 | ## Внесення змін 110 | 111 | Перегляд еволюції файлів проєкту 112 | 113 | ```$ git log``` 114 | 115 | Виводить історію версії поточної гілки 116 | 117 | ```$ git log --follow [назва файлу]``` 118 | 119 | Виводить історію версії вказаного файлу, включно з перейменуваннями 120 | 121 | ```$ git diff [перша-гілка]...[друга-гілка]``` 122 | 123 | Виводить різницю між двома гілками 124 | 125 | ```$ git show [коміт]``` 126 | 127 | Виводить метадані та зміни вказаного коміту 128 | 129 | ```$ git add [назва файлу]``` 130 | 131 | Зберігає зміни в файлі, готуючись до створення коміту 132 | 133 | ```$ git commit -m "[повідомлення з описом]"``` 134 | 135 | Записує зміни в файлі в історію версій, створюючи новий коміт 136 | 137 | ## Відновлення комітів 138 | 139 | Видалення помилок і створення нової історії версій 140 | 141 | ```$ git reset [коміт]``` 142 | 143 | Відміняє всі коміти після вказаного, зберігаючи зміни локально 144 | 145 | ```$ git reset --hard [коміт]``` 146 | 147 | Видаляє всю історію і повертається до вказаного коміту 148 | 149 | > ОБЕРЕЖНО! Зміни в історії можуть мати кепські наслідки. Якщо вам треба змінити коміти, що існують на GitHub (віддалено), дійте обережно. Якщо вам потрібна допомога, звертайтесь до [github.community](https://github.community) або до підтримки. 150 | 151 | {% endcapture %} 152 |
153 | {{ colThree | markdownify }} 154 |
155 | 156 | {% capture colFour %} 157 | 158 | ## Глосарій 159 | 160 | - **git**: розподілена система контролю версій з відкритим кодом 161 | - **GitHub**: платформа для хостингу і співпраці над репозиторіями Git 162 | - **коміт** (commit): об'єкт Git, стан всього репозиторію стиснутий в SHA 163 | - **гілка** (branch): невеликий рухомий вказівник на коміт 164 | - **клон** (clone): локальна версія репозиторію, включно з усіма комітами і гілками 165 | - **віддалений репозиторій** (remote): спільний GitHub репозиторій, що використовується членами команди для обміну змінами 166 | - **fork**: копія репозиторію GitHub іншого користувача 167 | - **запит на поєднання** (pull request): спосіб порівняти і обговорити зміни на гілці з відгуками, коментарями, інтегрованими тестами і т.д. 168 | - **HEAD**: вказівник, що позначає поточну робочу директорію. Може вказувати на різні гілки, теги і коміти з використанням `git switch` 169 | 170 | {% endcapture %} 171 |
172 | {{ colFour | markdownify }} 173 |
174 |
175 | -------------------------------------------------------------------------------- /downloads/zh_CN/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Git 备忘单 5 | byline: Git 是一个开源的分布式版本控制系统,方便你在笔记本或桌面端进行 GitHub 的操作,这个备忘单总结了常用的 Git 命令行指令,以便快速查询。 6 | leadingpath: ../../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## 安装 11 | 12 | ### GitHub Desktop 13 | [desktop.github.com](https://desktop.github.com) 14 | 15 | ### Git 全平台版 16 | [git-scm.com](https://git-scm.com) 17 | 18 | ## 配置工具 19 | 对所有本地仓库的用户信息进行配置 20 | 21 | ```$ git config --global user.name "[name]"``` 22 | 23 | 对你的commit操作设置关联的用户名 24 | 25 | ```$ git config --global user.email "[email address]"``` 26 | 27 | 对你的commit操作设置关联的邮箱地址 28 | 29 | ```$ git config --global color.ui auto``` 30 | 31 | 启用有帮助的彩色命令行输出 32 | 33 | ## 分支 34 | 35 | 分支是使用 Git 工作的一个重要部分。你做的任何提交都会发生在当前“checked out”到的分支上。使用 `git status` 查看那是哪个分支。 36 | 37 | ```$ git branch [branch-name]``` 38 | 39 | 创建一个新分支 40 | 41 | ```$ git switch -c [branch-name]``` 42 | 43 | 切换到指定分支并更新工作目录(working directory) 44 | 45 | ```$ git merge [branch]``` 46 | 47 | 将指定分支的历史合并到当前分支。这通常在拉取请求(PR)中完成,但也是一个重要的 Git 操作。 48 | 49 | ```$ git branch -d [branch-name]``` 50 | 51 | 删除指定分支 52 | 53 | {% endcapture %} 54 |
55 | {{ colOne | markdownify }} 56 |
57 | 58 | 59 | {% capture colTwo %} 60 | 61 | ## 创建仓库 62 | 63 | 当着手于一个新的仓库时,你只需创建一次。要么在本地创建,然后推送到 GitHub;要么通过 clone 一个现有仓库。 64 | 65 | ```$ git init``` 66 | 67 | 在使用过 `git init` 命令后,使用以下命令将本地仓库与一个 GitHub 上的空仓库连接起来: 68 | 69 | ```$ git remote add origin [url]``` 70 | 71 | 将现有目录转换为一个 Git 仓库 72 | 73 | ```$ git clone [url]``` 74 | 75 | Clone(下载)一个已存在于 GitHub 上的仓库,包括所有的文件、分支和提交(commits) 76 | 77 | ## .gitignore 文件 78 | 79 | 有时一些文件最好不要用 Git 跟踪。这通常在名为 `.gitignore` 的特殊文件中完成。你可以在 [github.com/github/gitignore](https://github.com/github/gitignore) 找到有用的 `.gitignore` 文件模板。 80 | 81 | ## 同步更改 82 | 83 | 将你本地仓库与 GitHub.com 上的远端仓库同步 84 | 85 | ```$ git fetch``` 86 | 87 | 下载远端跟踪分支的所有历史 88 | 89 | ```$ git merge``` 90 | 91 | 将远端跟踪分支合并到当前本地分支 92 | 93 | ```$ git push``` 94 | 95 | 将所有本地分支提交上传到 GitHub 96 | 97 | ```$ git pull``` 98 | 99 | 使用来自 GitHub 的对应远端分支的所有新提交更新你当前的本地工作分支。`git pull` 是 `git fetch` 和 `git merge` 的结合 100 | 101 | {% endcapture %} 102 |
103 | {{ colTwo | markdownify }} 104 |
105 |
106 | 107 | {% capture colThree %} 108 | 109 | ## 进行更改 110 | 111 | 浏览并检查项目文件的发展 112 | 113 | ```$ git log``` 114 | 115 | 列出当前分支的版本历史 116 | 117 | ```$ git log --follow [file]``` 118 | 119 | 列出文件的版本历史,包括重命名 120 | 121 | ```$ git diff [first-branch]...[second-branch]``` 122 | 123 | 展示两个分支之间的内容差异 124 | 125 | ```$ git show [commit]``` 126 | 127 | 输出指定commit的元数据和内容变化 128 | 129 | ```$ git add [file]``` 130 | 131 | 将文件进行快照处理用于版本控制 132 | 133 | ```$ git commit -m "[descriptive message]"``` 134 | 135 | 将文件快照永久地记录在版本历史中 136 | 137 | ## 重做提交 138 | 139 | 清除错误和构建用于替换的历史 140 | 141 | ```$ git reset [commit]``` 142 | 143 | 撤销所有 `[commit]` 后的的提交,在本地保存更改 144 | 145 | ```$ git reset --hard [commit]``` 146 | 147 | 放弃所有历史,改回指定提交。 148 | 149 | > 小心!更改历史可能带来不良后果。如果你需要更改 GitHub(远端)已有的提交,请谨慎操作。如果你需要帮助,可访问 [github.community](https://github.community) 或联系支持(support)。 150 | 151 | {% endcapture %} 152 |
153 | {{ colThree | markdownify }} 154 |
155 | 156 | {% capture colFour %} 157 | 158 | ## 术语表 159 | 160 | - **git**: 一个开源的分布式版本控制系统 161 | - **GitHub**: 一个托管和协作管理 Git 仓库的平台 162 | - **commit 提交**: 一个 Git 对象,是你整个仓库的快照的哈希值 163 | - **branch 分支**: 一个轻型可移动的 commit 指针 164 | - **clone**: 一个仓库的本地版本,包含所有提交和分支 165 | - **remote 远端**: 一个 GitHub 上的公共仓库,所有小组成员通过它来交换修改 166 | - **fork**: 一个属于另一用户的 GitHub 上的仓库的副本 167 | - **pull request 拉取请求**: 一处用于比较和讨论分支上引入的差异,且具有评审、评论、集成测试等功能的地方 168 | - **HEAD**: 代表你当前的工作目录。使用`git checkout` 可移动 HEAD 指针到不同的分支、标记(tags)或提交 169 | 170 | {% endcapture %} 171 |
172 | {{ colFour | markdownify }} 173 |
174 |
175 | -------------------------------------------------------------------------------- /downloads/zh_TW/github-git-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: cheat-sheet 3 | redirect_to: false 4 | title: GitHub Git 速查清單 5 | byline: Git 是一個開源的分散式版本控制系統,可讓使用者在本機端(包含筆記型電腦與桌上型電腦)進行 GitHub 上的操作,這份速查清單羅列了使用者經常使用的指令,以提供使用者可快速參照。 6 | leadingpath: ../../../ 7 | --- 8 | 9 | {% capture colOne %} 10 | ## 安裝 Git 11 | 12 | ### GitHub 桌面版 13 | [desktop.github.com](https://desktop.github.com) 14 | 15 | ### Git 通用平台版 16 | [git-scm.com](https://git-scm.com) 17 | 18 | ## Git 操作設定 19 | 設定使用者在操作本機端 Git 的通用配置 20 | 21 | ```$ git config --global user.name "[name]"``` 22 | 23 | 設定本機端 Git 使用者的名稱 24 | 25 | ```$ git config --global user.email "[email address]"``` 26 | 27 | 設定本機端 Git 使用者的電子郵件 28 | 29 | ```$ git config --global color.ui auto``` 30 | 31 | 啟用本機端使用命令列時的彩色輸出模式,提高使用 Git 的可讀性 32 | 33 | ## 分支 34 | 35 | 分支在使用者操作 Git 時扮演重要的角色。使用者提出的任何提交 (commit) 都會當前所在的分支上。使用 `git status` 可查看當前所在的分支。 36 | 37 | ```$ git branch [branch-name]``` 38 | 39 | 建立一個新的分支 40 | 41 | ```$ git switch -c [branch-name]``` 42 | 43 | 切換到指定分支,使用者的工作目錄會基於該分支更新 44 | 45 | ```$ git merge [branch]``` 46 | 47 | 將指定分支的檔案歷程合併到當前分支。相同的結果經常會透過合併請求 (Pull Request) 達成,但此指令仍在本機端扮演重要的角色。 48 | 49 | ```$ git branch -d [branch-name]``` 50 | 51 | 刪除指定分支 52 | 53 | {% endcapture %} 54 |
55 | {{ colOne | markdownify }} 56 |
57 | 58 | 59 | {% capture colTwo %} 60 | 61 | ## 建立 Git 倉儲 62 | 63 | 使用者可透過兩種途徑來建立一個 Git 倉儲:第一,在本機端建立後,再推送到 GitHub;第二,取得該 Git 倉儲連結後,複製 (clone) 一份到本機端。 64 | 65 | ```$ git init``` 66 | 67 | 使用者可透過 `git init` 指令,在本機端建立一個作為 Git 倉儲的資料夾目錄,並可透過以下指令建立本機端 Git 倉儲與 GitHub 倉儲的連結。 68 | 69 | ```$ git remote add origin [url]``` 70 | 71 | 指定一個 URL 為 `[url]` 的遠端倉儲 `origin` 作為本機端 Git 倉儲的連結點。 72 | 73 | ```$ git clone [url]``` 74 | 75 | 複製 (clone) 一個存在 GitHub 上的倉儲到本機端,其中包含所有檔案、分支與提交 (commits) 76 | 77 | ## .gitignore 檔案 78 | 79 | 使用者在一些情形下不希望 Git 追蹤部分檔案的狀態,這個時候可透過名為 `.gitignore` 的檔案達成,使用者可以在 [github.com/github/gitignore](https://github.com/github/gitignore) 找到有參考價值的 `.gitignore` 範本。 80 | 81 | ## 同步更改 82 | 83 | 將本機端 Git 倉儲與遠端 GitHub 倉儲進行狀態同步 84 | 85 | ```$ git fetch``` 86 | 87 | 下載遠端分支的所有歷史 88 | 89 | ```$ git merge``` 90 | 91 | 將遠端分支合併到當前本機端的分支 92 | 93 | ```$ git push``` 94 | 95 | 將當前本機端的分支上傳到 GitHub 96 | 97 | ```$ git pull``` 98 | 99 | 讀取 GitHub 遠端分支的對應提交,來更新使用者本機端當前的分支。當使用者接連著下達 `git fetch` 和 `git merge` 的指令,效果等同於直接下達 `git pull` 指令。 100 | 101 | {% endcapture %} 102 |
103 | {{ colTwo | markdownify }} 104 |
105 |
106 | 107 | {% capture colThree %} 108 | 109 | ## 管理 Git 追蹤狀態變更 110 | 111 | 檢視專案檔案的變更歷史 112 | 113 | ```$ git log``` 114 | 115 | 列出當前分支的變更歷史 116 | 117 | ```$ git log --follow [file]``` 118 | 119 | 列出指定檔案的變更歷史,包括重新命名 120 | 121 | ```$ git diff [first-branch]...[second-branch]``` 122 | 123 | 顯示兩個分支的差異處 124 | 125 | ```$ git show [commit]``` 126 | 127 | 顯示指定提交的詮釋資料與內容變化 128 | 129 | ```$ git add [file]``` 130 | 131 | 對檔案進行快照,以讓 Git 納入版本控制 132 | 133 | ```$ git commit -m "[descriptive message]"``` 134 | 135 | 將快照正式納入 Git 的版本控制歷史 136 | 137 | ## 修復提交 138 | 139 | 清除錯誤提交並修正 140 | 141 | ```$ git reset [commit]``` 142 | 143 | 復原所有 `[commit]` 後的提交,並在本機端保留該復原內容 144 | 145 | ```$ git reset --hard [commit]``` 146 | 147 | 復原所有 `[commit]` 後的提交,並在本機端捨棄該復原內容 148 | 149 | > 特別注意!修改版本控制紀錄可能造成不好的後果。如果你需要修改遠端 GitHub 既有的提交,請小心操作。如果你需要幫助,可在社群 [github.community](https://github.community) 提出,或尋求[支援](https://support.github.com/)。 150 | 151 | {% endcapture %} 152 |
153 | {{ colThree | markdownify }} 154 |
155 | 156 | {% capture colFour %} 157 | 158 | ## 術語清單 159 | 160 | - **git**: 一個開源的分散式版本控制系統 161 | - **GitHub**: 一個讓使用者在使用本機端 Git 時,可進行遠端託管和協作管理的平台 162 | - **commit**: 提交,在 Git 的架構中作為一個物件,存放著當前倉儲狀態的快照,並以 SHA 形式存在 163 | - **branch**: 分支,通常用於區分 commit 的用途與專案的目標 164 | - **clone**: 複製,透過 `clone` 可讓使用者複製遠端倉儲到本機端,並進行後續的一系列操作 165 | - **remote**: 遠端,一個可被專案成員或大眾所觸及的遠端倉儲,有權限的使用者將會提交他們的檔案變更到此倉儲 166 | - **fork**: 副本,使用者可建立一個被其他使用者所擁有之遠端倉儲副本 167 | - **pull request**: 合併請求,當使用者變更倉儲內容後,需要透過合併請求,尋求倉儲所有人的同意,方能成為該倉儲的正式內容;透過合併請求,可讓提交人、倉儲關係人進行討論與測試 168 | - **HEAD**: 表示使用者當前的工作目錄。使用者可透過 `git checkout` 切換到不同的分支、標記 (tags) 或提交,`HEAD` 也會因此改變 169 | 170 | {% endcapture %} 171 |
172 | {{ colFour | markdownify }} 173 |
174 |
175 | -------------------------------------------------------------------------------- /git-guides/git-clone.md: -------------------------------------------------------------------------------- 1 | # Git Clone 2 | 3 | The `git clone` command is used to create a copy of a specific repository or branch within a repository. 4 | 5 | Git is a distributed version control system. Maximize the advantages of a full repository on your own machine by cloning. 6 | 7 | ## What Does `git clone` Do? 8 | 9 | ```sh 10 | git clone https://github.com/github/training-kit.git 11 | ``` 12 | 13 | When you clone a repository, you don't get one file, as you may in other centralized version control systems. By cloning with Git, you get the entire repository – all files, all branches, and all commits. 14 | 15 | Cloning a repository is typically only done once, at the beginning of your interaction with a project. Once a repository already exists on a remote, like on GitHub, then you would clone that repository so you could interact with it locally. Once you have cloned a repository, you won't need to clone it again to do regular development. 16 | 17 | The ability to work with the entire repository means that all developers can work more freely. Without being limited by which files you can work on, you can work on a feature branch to make changes safely. Then, you can: 18 | - later use `git push` to share your branch with the remote repository 19 | - open a pull request to compare the changes with your collaborators 20 | - test and deploy as needed from the branch 21 | - merge into the `main` branch. 22 | 23 | ## How to Use `git clone` 24 | 25 | ### Common usages and options for `git clone` 26 | 27 | * `git clone [url]`: Clone (download) a repository that already exists on GitHub, including all of the files, branches, and commits. 28 | * `git clone --mirror`: Clone a repository but without the ability to edit any of the files. This includes the refs or branches. You may want to use this if you are trying to create a secondary copy of a repository on a separate remote and you want to match all of the branches. This may occur during configuration using a new remote for your Git hosting, or when using Git during automated testing. 29 | * `git clone --single-branch`: Clone only a single branch 30 | * `git clone --sparse`: Instead of populating the working directory with all of the files in the current commit recursively, only populate the files present in the root directory. This could help with performance when cloning large repositories with many directories and sub-directories. 31 | * `git clone --recurse-submodules[=