GithubHelp home page GithubHelp logo

angular5.x's Introduction

Important Points to Remember

Adding an existing project to GitHub using the command line

Create a new repository on GitHub. To avoid errors, do not initialize the new repository with README, license, or gitignore files. You can add these files after your project has been pushed to GitHub.

Open Git Bash.

Change the current working directory to your local project.

Initialize the local directory as a Git repository.

git init

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'.

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 repository. To remove this commit and modify the file, use 'git reset --soft HEAD~1' and commit and add the file again.

Copy remote repository URL fieldAt the top of your GitHub repository's Quick Setup page, click

to copy the remote repository URL.

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

git remote add origin remote repository URL

Sets the new remote

git remote -v

Verifies the new remote URL

Push the changes in your local repository to GitHub.

git push origin master

Pushes the changes in your local repository up to the remote repository you specified as the origin

How can I delete a file from git repo?

git rm file1.txt git commit -m "remove file1.txt"

But if you want to remove the file only from the Git repository and not remove it from the filesystem, use:

git rm --cached file1.txt git commit -m "remove file1.txt"

And to push changes to remote repo

git push origin branch_name

How to add a file or directory to github once inital repository created and files added

  1. Remove node_module first
  2. git add .
  3. git commit -m ""
  4. git push origin master

angular5.x's People

Contributors

ajay279299 avatar ajayk-cse avatar

Watchers

James Cloos 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.