Skip to content

Instantly share code, notes, and snippets.

View Nayteruz's full-sized avatar

Aleksandr Nayteruz

  • Russia/Barnaul
View GitHub Profile
# Шпаргалка по консольным командам Git
## Общее
Git — система контроля версий (файлов). Что-то вроде возможности сохраняться в компьютерных играх (в Git эквивалент игрового сохранения — коммит).
Любой файл в папке существующего репозитория может находиться или не находиться под версионным контролем (отслеживаемые и неотслеживаемые).
Неотслеживаемые файлы можно в любой момент сделать отслеживаемыми и наоборот.
@Nayteruz
Nayteruz / publish-ghpages.md
Created August 2, 2022 19:22 — forked from tduarte/publish-ghpages.md
If you need to force push an subtree
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
@Nayteruz
Nayteruz / gh-pages-deploy.md
Created April 17, 2022 16:07 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@Nayteruz
Nayteruz / README.md
Created October 31, 2020 05:18 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})