I've only changed 2 files and they are the only ones I want to push to Github. I've added the 2 files I wanted and committed the changes with comments. However, when I push i get the following:
git push
To github.com:TinsleyBridgeGroup/TBL-bending-presses.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:TinsleyBridgeGroup/TBL-bending-presses.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Based on the above i git pulled and received the following error:
git pull
error: Your local changes to the following files would be overwritten by merge:
TBL165-238.json
TBL165-279.json
Please commit your changes or stash them before you merge.
Aborting
How can I push the 2 files I've changed "read_pressure.py" and "TBL165-238.json". A bit of background, the script is used on multiple IOT devices. The json file is settings that are machine specific and the read_pressures.py is generic and run on multiple computers. Git status command is listed below.
git status
On branch master
Your branch and 'origin/master' have diverged,
and have 1 and 3 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: .vscode/launch.json
modified: .vscode/settings.json
modified: TBL165-238.json
modified: TBL165-279.json
modified: read_pressure.py
no changes added to commit (use "git add" and/or "git commit -a")