Giter Club home page Giter Club logo

sample's Introduction

sample

simple text documents for testing git commands

hello, local commit here

get last 2 entries

git log -2

after 1 local commit show that local main branch is pointing to a different ref than the remote

git show-ref main

now push local to remote

git push git show-ref main

force a push, ignoring the remote changes

git push -f

use git fetch to get remote changes and merge with local changes of there is a conflicts

you fetch and merge, then you push git fetch git merge git push

you pull, then you push pull = fetch and merge git pull git push

rebasing with a remote

change in dev branch

create a new branch locally and then add to remote

https://stackoverflow.com/questions/2765421/how-do-i-push-a-new-local-branch-to-a-remote-git-repository-and-track-it-too Edit files, add and commit. Then push with the -u (short for --set-upstream) option:

git branch dev git switch dev make changes git push -u origin dev

never rebase shared repository commits, rebase locally

fork clones a project from someone else to my github

you can configure two remotes when you want to use a project as your base and then

have an upstream (original author) and origin (my fork)

sample's People

Contributors

jeffroy956 avatar

Watchers

 avatar

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.