0% found this document useful (0 votes)
10 views

Github

Uploaded by

bi trần
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Github

Uploaded by

bi trần
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

ACER@bi MINGW64 /c/github

$ git init
Initialized empty Git repository in C:/github/.git/

ACER@bi MINGW64 /c/github (master)


$ git remote add origin https://github.com/tranbebi/test.git

ACER@bi MINGW64 /c/github (master)


$ git remote -v
origin https://github.com/tranbebi/test.git (fetch)
origin https://github.com/tranbebi/test.git (push)

ACER@bi MINGW64 /c/github (master)


$ git add.
git: 'add.' is not a git command. See 'git --help'.

The most similar command is


add

ACER@bi MINGW64 /c/github (master)


$ git commit -m"test thôi"
On branch master

Initial commit

Untracked files:
(use "git add <file>..." to include in what will be committed)
index.js

nothing added to commit but untracked files present (use "git add" to track)

ACER@bi MINGW64 /c/github (master)


$ ^C

ACER@bi MINGW64 /c/github (master)


$ git push origin master
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/tranbebi/test.git'

ACER@bi MINGW64 /c/github (master)


$ git branch

ACER@bi MINGW64 /c/github (master)


$ git checkout master
error: pathspec 'master' did not match any file(s) known to git

ACER@bi MINGW64 /c/github (master)


$ git push origin main
error: src refspec main does not match any
error: failed to push some refs to 'https://github.com/tranbebi/test.git'

ACER@bi MINGW64 /c/github (master)


$ git push origin master
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/tranbebi/test.git'

ACER@bi MINGW64 /c/github (master)


$ git push origin master
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/tranbebi/test.git'

ACER@bi MINGW64 /c/github (master)


$ git add localgitdir
fatal: pathspec 'localgitdir' did not match any files

ACER@bi MINGW64 /c/github (master)


$ git commit -m "Initial Commit"
On branch master

Initial commit

Untracked files:
(use "git add <file>..." to include in what will be committed)
index.js

nothing added to commit but untracked files present (use "git add" to track)

ACER@bi MINGW64 /c/github (master)


$ git push origin master
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/tranbebi/test.git'

ACER@bi MINGW64 /c/github (master)


$ git add index.js

ACER@bi MINGW64 /c/github (master)


$ git commit -m "Initial Commit"
[master (root-commit) aab36e2] Initial Commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 index.js

ACER@bi MINGW64 /c/github (master)


$ git push origin master
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 209 bytes | 209.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote:
remote: Create a pull request for 'master' on GitHub by visiting:
remote: https://github.com/tranbebi/test/pull/new/master
remote:
To https://github.com/tranbebi/test.git
* [new branch] master -> master

ACER@bi MINGW64 /c/github (master)


$
lệnh để đưa file lên github
$ git add index.js // thêm tên file
$ git commit -m "Initial Commit" // thêm ghi chú cho nó bắt buộc có
$ git push origin master // và đưa nó lên nguồn master

git init
git clone
git pull
git add và git add.
git commit
git push
git log
git log-decorate -graph -oneline

You might also like