Git GitHub

Git GitHub

https://yihui.name/knitr/demo/wordpress/

https://github.com/yihui/travis-blogdown

  • add this to book.json

{
"plugins": ["youtube", "youtubex", "component", "autosize-iframe"]
    }
  • Gitbook plugin component

https://plugins.gitbook.com/plugin/component

{
    "plugins": ["component"]
}

<div data-gb-custom-block data-tag="component">

</div>
  • YouTube

  • add this to book.json

  • Gitbook plugin component

https://plugins.gitbook.com/plugin/component

  • YouTube

GitBook Plugins

  • add this to book.json

  • Gitbook plugin component

https://plugins.gitbook.com/plugin/component

  • YouTube

https://www.softwarelab.it/2018/10/12/adding-an-existing-project-to-github-using-the-command-line/

  • Create a new repository on GitHub. You can also add a gitignore file, a readme and a > licence if you want

  • Open Git Bash

  • Change the current working directory to your local project.

  • Initialize the local directory as a Git repository.

  • Add the files in your new local repository. This stages them for the first commit.

  • Commit the files that you’ve staged in your local repository.

  • Copy the https url of your newly created repo

  • In the Command prompt, add the URL for the remote repository where your local repository > will be pushed.

  • Push the changes in your local repository to GitHub.

clone a branch

https://github.com/jamovi/jamovi/tree/current-dev

Keeping a fork up to date

https://gist.github.com/sbalci/9959350f59eda7ca24bd77fe2d21323f

  1. Clone your fork:

  1. Add remote from original repository in your forked repository:

  1. Updating your fork from original repo to keep up with their changes:

Deleting the .git folder may cause problems in your git repository. If you want to delete all your commit history but keep the code in its current state, it is very safe to do it as in the following:

  1. Checkout

    git checkout --orphan latest_branch

  2. Add all the files

    git add -A

  3. Commit the changes

    git commit -am "commit message"

  4. Delete the branch

    git branch -D main

  5. Rename the current branch to main

    git branch -m main

  6. Finally, force update your repository

    git push -f origin main

Last updated

Was this helpful?