How to push code to GITHUB

How to push code to GITHUB

  1. Signup to Github
  2. Sign in to Github

Once in a computer

  1. Download git software
  2. Open terminal and verify git installation using below command

 git --version        

  1. If the above command prints the version - execute following things

git config --global user.name "Your Name"
git config --global user.email "[email protected]"        

Once in a project

  1. Initialize git using bellow command

git init        

  1. Go to your profile page in GitHub website & create a new repository.
  2. and copy the path and paste in terminal as bellow

git remote add origin [<https://github.com/yourgithubname/yourreponame.git>](<https://github.com/joinwebla/ecommerce-app-2.git>)        

  1. Verify remote path setup using bellow command

git remote -v        

Every time when you push the code

  1. You can run the following command any time to check the files status

git status        

  • red_files - untracked - not decided to push to GitHub
  • green_files - staged - you are finalised
  • no_changes - committed

  1. Run the bellow command to add files to stag

git add .        

  1. Commit your changes with a message

git commit -m 'Your message that explains about the changes included here'        

  1. Push your changes to origin using your username and access token created in your GitHub Profile section

git push origin master        

  1. Enter your GitHub username & Access token to push code to GitHub.
  2. You can see your changes pushed to GitHub successfully.


要查看或添加评论,请登录

Ganesh Babu Manam的更多文章

  • Data Types in Javascript

    Data Types in Javascript

    There are two types of data types available in Javascript. Primitive Data type (boolean, null, number, undefined…

  • How to declare variables in Javascript

    How to declare variables in Javascript

    Variables are containers for storing data Variable is a place where we can store values in our program for later use…

  • Javascript- The heart and soul of Web Development

    Javascript- The heart and soul of Web Development

    What is JavaScript? JavaScript is a scripting language used to create interactive and dynamic websites. Scripting…

社区洞察

其他会员也浏览了