Comments (15)
try instead
git push origin HEAD:hw
+1 for first issue on this lab
from 1-open-window.
I am having a similar issue. I get the Error is src refspec hw does not match any. as well. When i try git push origin HEAD:hw I get this message in response: Michael-Zelaskos-MacBook-Pro:Sources mgzelasko$ git push origin HEAD:hw
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/cisc3620/1-open-window-MichaelGregg.git
3f9b8e6..a22d9de HEAD -> hw
But then when i move to the next step, when i try to set compare to hw, there is no hw file for me to set it to
from 1-open-window.
Looking at your repository, it seems that you pushed to both master and hw, making them identical.
You can roll back the commit on master by doing
git revert (yours is a22d9de)
You should then be able to do the pull request with master as base.
Please close this issue if that works.
from 1-open-window.
from 1-open-window.
This is what i get when i try the revert command:
Michael-Zelaskos-MacBook-Pro:1-open-window-MichaelGregg mgzelasko$ git revert a22d9de
error: Your local changes to the following files would be overwritten by merge:
.DS_Store
Glitter/.DS_Store
Please commit your changes or stash them before you merge.
Aborting
fatal: revert failed
from 1-open-window.
You can do
git stash
To store your changes before reverting
Or you can do
git --force revert COMMIT#
to force the change
You can also use
git reset --hard COMMIT
https://www.atlassian.com/git/tutorials/undoing-changes
from 1-open-window.
Again, the goal here is to get master back to the way it was before the commit, you can use several of the approaches in the link to do that.
Parenthetically, .Dsstore should be in your .gitignore so it doesn't get added
from 1-open-window.
This is what happens taking the git stash approach:
Michael-Zelaskos-MacBook-Pro:1-open-window-MichaelGregg mgzelasko$ git stash
Saved working directory and index state WIP on master: a22d9de Hw upload feb 4 1:41pm
HEAD is now at a22d9de Hw upload feb 4 1:41pm
Michael-Zelaskos-MacBook-Pro:1-open-window-MichaelGregg mgzelasko$
E325: ATTENTION
Found a swap file by the name "~/OpenGl/Comp_Graphics/Labs/1-open-window-Michael
Gregg/.git/.COMMIT_EDITMSG.swp"
owned by: mgzelasko dated: Sun Feb 5 13:20:42 2017
file name: ~mgzelasko/OpenGl/Comp_Graphics/Labs/1-open-window-MichaelGr
egg/.git/COMMIT_EDITMSG
modified: YES
user name: mgzelasko host name: Michael-Zelaskos-MacBook-Pro.local
process ID: 4275
While opening file "/Users/mzelasko227/OpenGl/Comp_Graphics/Labs/1-open-window-M
ichaelGregg/.git/COMMIT_EDITMSG"
dated: Sun Feb 5 13:34:38 2017
NEWER than swap file!
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /Users/mzelasko227/OpenGl/Com
p_Graphics/Labs/1-open-window-MichaelGregg/.git/COMMIT_EDITMSG"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/Users/mzelasko227/OpenGl/Com
p_Graphics/Labs/1-open-window-MichaelGregg/.git/.COMMIT_EDITMSG.swp"
to avoid this message.
Swap file "~/OpenGl/Comp_Graphics/Labs/1-open-window-MichaelGregg/.git/.COMMIT_EDITMSG.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
If i hit E, and then i try the revert command:
Michael-Zelaskos-MacBook-Pro:1-open-window-MichaelGregg mgzelasko$ git revert a22d9de
Revert "Hw upload feb 4 1:41pm"
This reverts commit a22d9deeed1b36991e921d474fc5bfd3dfc30822.
Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit.
Committer: Michael Zelasko [email protected]
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
deleted: .DS_Store
deleted: Glitter/.DS_Store
modified: Glitter/Sources/main.cpp
deleted: Glitter/Vendor/.DS_Store
deleted: Goo/Goo.xcodeproj/project.pbxproj
deleted: Goo/Goo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted: Goo/Goo.xcodeproj/project.xcworkspace/xcuserdata/mgzelasko.xcuserdatad/UserInterfaceState.xcuserstate
deleted: Goo/Goo.xcodeproj/xcuserdata/mgzelasko.xcuserdatad/xcschemes/Goo.xcscheme
deleted: Goo/Goo.xcodeproj/xcuserdata/mgzelasko.xcuserdatad/xcschemes/xcschememanagement.plist
deleted: Goo/Goo/main.cpp
~
~
~
~
-- INSERT --
This is what happens when i try git --force revert COMMIT#:
Michael-Zelaskos-MacBook-Pro:1-open-window-MichaelGregg mgzelasko$ git --force revert COMMIT#
Unknown option: --force
usage: git [--version] [--help] [-C ] [-c name=value]
[--exec-path[=]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=] [--work-tree=] [--namespace=]
[]
This is what i get when i try git reset --hard COMMIT:
Michael-Zelaskos-MacBook-Pro:1-open-window-MichaelGregg mgzelasko$ git reset --hard COMMIT
fatal: ambiguous argument 'COMMIT': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
Michael-Zelaskos-MacBook-Pro:1-open-window-MichaelGregg mgzelasko$
Not sure exactly what went wrong in the attempt to restore the master through the git stash command
from 1-open-window.
Replace COMMIT # with the number of your latest commit to master.
Again, you have a lot of extra things happening because you ran cmake in a different directory. You must make sure to add that directory to your .gitignore file.
from 1-open-window.
Michael-Zelaskos-MacBook-Pro:1-open-window-MichaelGregg mgzelasko$ git reset --hard a22d9deeed1b36991e921d474fc5bfd3dfc30822
HEAD is now at a22d9de Hw upload feb 4 1:41pm
Is this what should happen when i try the git reset hard commit# command?
How should i add that directory to the .gitignore file?
from 1-open-window.
Yes.
open up .gitignore in any text editor and add the name of the directory on its own line.
from 1-open-window.
Would a way to do it be to select the file in my private repository and hit the edit button and add the directory using the text editor that would take me to and then hit commit changes or is that doing the wrong action?
How do i find out the name of this different directory in which i ran cmake?
from 1-open-window.
Yes that will work.
From your output it looks like it's called Goo
Goo/Goo.xcodeproj/project.pbxproj
from 1-open-window.
from 1-open-window.
from 1-open-window.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 1-open-window.