Git Commands

Commands i know:

    git [subcommand]
        clone [repo]<< Clone repo
        add [file]  << add the file to stage area (new file)
        stage [file]<< move file to stage area (update file)
        restore --stage
                    << Unstage file
        commit -m [message]
                    << Prepare your code before push on server
        push        << Push code to server
                    --set-upstream-to=origin/[brach] if new brach
                    --force force push youre code
                    --force-with-lease if your commit not uptodate it's will not push
        reset [commit]
                    << Reset your code make it look like [commit]
                        --soft(Collect your code)
                        --hard (make youre code look like commit)
        fetch       << Check new commit
        pull        << update your code on your local macth on the server
        merge       << Merge code
                    --abort if somthing worng affter merge (in case not push yet)
        brach [new brach]
                    << Craete new brach
        switch      << switch brach
        checkout    << switch but old
                       -b is create new brach and checkout to new brach
        remote      << use for move the remote or check your remote (remote -v)
        cherry-pick [commit]
                    << Pick commit to your HEAD?
                    that why you need to commit affter done
HEAD : what you see/stay/point now




.mymoonnote