I'm trying to upload an existing project to Github.
I'm using Git 2.3.5 because newer versions are not compatible with Mac OS X Lion (10.7.5).
I've tried to use git add eu
because I found in a guide. Result was the following error:
fatal: pathspec 'eu' did not match any files
I've also tried git add .
and git add --all
. It gave me a new line which was completely blank.
So, how would I upload my existing Maven project to Github?
- Mac OS X v10.7.5
- Git V2.3.5
New error:
MBA-10-09:~ myname$ git push -u origin master
To https://github.com/myname/importer.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/myname/importer.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
MBA-10-09:~ myname$ git config --global pull.rebase true
MBA-10-09:~ myname$ git stash
Saved working directory and index state WIP on master: b1c9c72 Added Importer v0.1-Beta
HEAD is now at b1c9c72 Added Importer v0.1-Beta
MBA-10-09:~ myname$ git pull --rebase
warning: no common commits
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 10 (delta 1), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (10/10), done.
From https://github.com/bys1/importer
* [new branch] master -> origin/master
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master
MBA-10-09:~ myname$ git stash pop
Removing README.md
On branch master
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: README.md
Untracked files:
(use "git add <file>..." to include in what will be committed)
.CFUserTextEncoding
.bash_history
.cache/
.config/
.cups/
.dropbox/
.eclipse/
.gitconfig
.gmwoommrc
.local/
.m2/
.mediafire/
.oracle_jre_usage/
.p2/
.sh_history
.ssh/
.tkyczxzn
Applications/
BuildData/
BuildTools.log.txt
Bukkit/
CraftBukkit/
Desktop/
Documents/
Downloads/
Dropbox/
Library/
Movies/
Music/
Pictures/
Public/
Spigot/
apache-maven-3.2.5/
craftbukkit-1.10.jar
magic.mgc
spigot-1.10.jar
work/
It took 2.42 seconds to enumerate untracked files. 'status -uno'
may speed it up, but you have to be careful not to forget to add
new files yourself (see 'git help status').
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (3eb015298d6369d65ba7551f0f81178b63cc119e)