开发者

how do i get files to the github server?

This question involves github. It might need to be migrated to another site.

How do I get files to the github server?

I've setup my user.name, user.email, and 开发者_JAVA技巧github.token on the client side

also, I've also translated my SSH key to the server side at github.com.

I verified SSH by using

ssh -T git@github.com

SSH is working

According to the directions, you simply stage your files, commit them, and push them.

When working in the Bash Shell I use

git push origin master

However this gives me the error...

![rejected] master->master(non-fast forward)

I'm basically following the directions from here

http://help.github.com/

Setting up Git, and Creating a Git Repo.


you already have something committed there that's ahead of what you have.

git fetch

then

git log --all --graph # or gitk --all

to see what those changes are.

If you want to ignore them and blast the history (not recommended if you are working with others on there) force the push:

git push -f

or, rebase or merge your changes on top of whatever is on the server:

git merge origin/master # assumes you are on the master branch

or

git rebase origin/master

Now you should be able to push:

git push origin master # can be just git push if you are tracking


Create a repository on Github. Follow the instructions from there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜