$ git status # On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # new_file.rb nothing added to commit but untracked files present (use "git add" to track)
$ git push origin master To [email protected]:rodolfospalenza/ancestry.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to '[email protected]:rodolfospalenza/ancestry.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') hint: before pushing again.
origin From github.com:rodolfospalenza/ancestry 39f00ab..bbf1e7e master -> origin/ master ~/ancestry [master] $ git rebase origin/master master First, rewinding head to replay your work on top of it... Applying: Add old file. USER 02
# Please enter the commit message for your changes. Lines starting 4 # with '#' will be ignored, and an empty message aborts the commit. 5 # On branch master 6 # Changes to be committed: 7 # (use "git reset HEAD^1 <file>..." to unstage) 8 # 9 # new file: old_file 10 #
2 r e1dbf27 Add old file. 3 f 3c84646 Add example file. 4 5 # Rebase 39f00ab..3c84646 onto 39f00ab 6 # 7 # Commands: 8 # p, pick = use commit 9 # r, reword = use commit, but edit the commit message 10 # e, edit = use commit, but stop for amending 11 # s, squash = use commit, but meld into previous commit 12 # f, fixup = like "squash", but discard this commit's log message 13 # x, exec = run command (the rest of the line) using shell 14 # 15 # These lines can be re-ordered; they are executed from top to bottom. 16 # 17 # If you remove a line here THAT COMMIT WILL BE LOST. 18 # However, if you remove everything, the rebase will be aborted. 19 # 20 # Note that empty commits are commented out
2 3 # Please enter the commit message for your changes. Lines starting 4 # with '#' will be ignored, and an empty message aborts the commit. 5 # Not currently on any branch. 6 # You are currently editing a commit during a rebase. 7 8 # Changes to be committed: 9 # (use "git reset HEAD^1 <file>..." to unstage) 10 # 11 # new file: old_file 12 #