Skip to main content

GitHub Push (exact method)

 


  1. Open Terminal.
  2. Change the current working directory to your local project.
  3. Initialize the local directory as a Git repository.
    $ git init
  4. Add the files in your new local repository. This stages them for the first commit.
    $ git add .
    # Adds the files in the local repository and stages them for commit. To unstage a file, use 'git reset HEAD YOUR-FILE'.
  5. Commit the files that you've staged in your local repository.
    $ git commit -m "First commit"
    # Commits the tracked changes and prepares them to be pushed to a remote repo
     
    Update Git
    ------------------
    $ git remote add upstream https://github.com/siumhossain/Personal-Blog.git
    $ git pull upstream master
    $ git status
    $ git push origin master 😤

    Ignore sensitive information.
    $touch .gitignore
    and add file or folder name for ignore those from uploading those file  in repo
     

Comments