Git Product home page Git Product logo

git-cheatsheet's Introduction

Git Cheatsheet

screenshot of app

Standalone HTML page that organizes Git's commands by what they affect. Built as I was learning git and trying to understand it. It's proved useful to others in the same endeavor.

Contributors

Comments and pull requests welcome.

To add a translation

  1. Determine the 2-letter language code (ISO 639-1). See the existing files in git-cheatsheet/lang.
  2. Create a new JSON file with the name of the code in git-cheatsheet/lang. Choose one of the other languages as a starting point.
  3. Write your translation. Use the exact identical property keys in the JSON structure. Only change the values.
  4. Add a link for users to choose the translation. In git-cheatsheet.html, insert (alphabetically) a new line that looks like:
<a class="lang" data-lang="vi" data-docs="Vietnamese translation by trgiangdo">vn</a>
  1. Add your name to the README.md above.
  2. Test manually
  3. Create a pull request. Give me a couple days to reply, but then feel free to write.
  4. Once it's merged, tell people about it.

Keep the PR restricted to changes related to the translation.

Development

Files are in the src folder. To see it locally:

  • yarn test to run the tests
  • yarn build to transpile.
  • yarn start to serve
  • Open http://127.0.0.1:8080/git-cheatsheet.html to view the page

CI is on Github Actions.

Deploy

Use FTP to upload to NDP Software

Exceptions caught and logged on Rollbar (private).

FAQ

Are there any "features"?

You can navigate over different "locations" and commands with the mouse, arrow keys, or vi-like keystrokes.

Why is it called "Cheat Sheet"?

It's pretty silly, actually. I had a little SEO juice from a couple other real cheat sheets, so I thought I'd just leverage that term. In retrospect, I think this was an okay tactic, as it brought people to the page.

Like it or have ideas?

If you like this and would like me to do more intereactions like this, send me an email... or patreon.com/ndp

License

Copyright (c) 2013-2024 Andrew J. Peterson, NDP Software

git-cheatsheet's People

Contributors

acecode avatar antoniopantaleo avatar dependabot[bot] avatar gerjanonline avatar henriqueajnb avatar kaiwinter avatar katrinleinweber avatar miltonescobar avatar ndp avatar r3drock avatar rebornsick avatar rufus125 avatar sminutoli avatar theoptik avatar trgiangdo avatar vistar avatar waldyrious avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-cheatsheet's Issues

Responsive!

Make the page responsive to different screen sizes

Great Repo

Great Cheatsheet,
Thanks for sharing !

Fix back button

Hacker News user complained about back button "breaking".

Expected behavior: when hitting back button, changes the view to reflect the URL change.

Bonus: page title changes appropriately.

dockerfile make it simple

FROM node:18-alpine AS base


FROM base AS deps

WORKDIR /app

COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn ./.yarn

# RUN yarn config set registry 'https://registry.npmmirror.com/' && yarn install
RUN yarn config set npmRegistryServer  'https://registry.npmmirror.com/' && yarn install



FROM base AS builder

WORKDIR /app

COPY . .
COPY --from=deps /app /app

RUN pwd && ls -al &&  yarn build




FROM base AS runner

WORKDIR /app

COPY --from=builder /app/* ./

EXPOSE 8080

CMD ["yarn", "start"]

git pull missing information

git pull not only updates your workspace but also adds a merge commit to your local repository. This could be confusing for some users.

I'm not sure how you would present this given the formatting though.

Great visualization btw!

Arrows for some commands should not touch "Upstream repository"

Hi @ndp ! I really like this cheat sheet! It really helped me when I was starting out with Git.

I noticed that the arrow for a few commands end or begin in the "Upstream repository", but they in fact do not communicate with the upstream repository:

  • reset --hard <remote>/<branch> : this reset the current branch to the commit at the tip of the remote-tracking branch <remote>/<branch>. The <remote> remote is not fetched. As such, I think this arrow should start in the "Local repository".
  • branch --track new <remote>/<branch> same thing; this does not communicate with the upstream repository so it should both start and end in the "Local repository".
  •  branch -r : this lists remote-tracking branches, and does not communicate with the "Upstream repository". It should be in "Local repository".

My point of view is that only commands that talk to the "Upstream repository" should have their arrows touching it. I think it's important for begginers to clearly distinguish between Git commands that are local and Git commands that talk to remote repositories.

Would you accept a PR that would make these changes ?

Adding RTL mode for supporting RTL languages.

Is your feature request related to a problem? Please describe.
Hi! I want to contribute to this project and Persian language, but as it's a RTL language, forcing it to be shown LTR is not a good idea.

Describe the solution you'd like
Adding a RTL mode for RTL languages.

Describe alternatives you've considered
I don't know what to write here. :/

Additional context
image
Here, I added direction: rtl; for testing the layout.

Translate to Brazilian Portuguese (pt-br)

It would be awesome to see a translation to pt-br just like the other ones (fr, de, etc.).

I can take this task, as soon as I receive some starting guidelines.

I've noticed a JSON file with translation. Would that be enough?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.