Login
Remember
Register
References
Ranks
Add reference
Git: How to upload files into Github repository with command-line
0
votes
305
views
added
Jul 26, 2017
in
Git
by
LC Marshal
Captain
(
25,790
points)
recategorized
Nov 17, 2017
by
LC Marshal
Create new repo in github e.g
https://github.com/username/new-repo.git
go to local directory
Go to local and cd to the directory e.g 'new-repo' directory, hence cd (or git bash here)
wamp/www/github/new-repo/
In 'new-repo' -->
git init
Add all files into repo -->
git add <filename>
Stage and commit all files -->
git commit -m "your initial push"
Add files into remote -->
git remote add origin
https://github.com/username/new-repo.git
Push files -->
git push -u origin master
done.
git
repository
command
command-line
github
Related reference
Handy Git command
Git - Ignore files to be included on repository with .ignore file
How to checkout branch into local repository using command?
Git push: renaming branches
Git: fix 'repository not found' with reinstall the credential-manager
Git push: to a remote repository
Add Github account to SourceTree
Git - To exclude updated file into master repository
lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
All categories
API
(37)
React
(149)
Javascript
(100)
Next JS
(10)
jQuery
(176)
CSS
(141)
SCSS
(25)
UI design
(1)
Vue
(25)
JSX
(12)
ES6
(8)
Regex
(6)
PHP
(62)
mySQL
(9)
Drupal
(15)
Bootstrap
(22)
Repository
(43)
Git
(42)
Mercurial
(1)
Software & tools
(38)
Google tools
(31)
Plugins
(13)
Gulp
(9)
NPM
(9)
Node JS
(7)
CMS
(9)
Command-line
(7)
Database
(2)
Domain & hosting
(16)
Elixir
(1)
HTML
(22)
Networking
(4)
Python
(0)
Server issues
(13)
VM & Remote desktop
(2)
VSCode
(7)
Windows
(11)
XSLT
(5)
General
(868)
...