Git command to commit a local replaced project to remote master
I am a total newbie on github. Now I am facing a problem which is:
I uploaded my new project to github,with a same repo name as the project folder.
Then I messed up the codes on local,want to recover the version I uploaded to github. Without knowing how to do so with github desktop client or git command, I deleted the folder from my local(laptop), then download the github copy and place it in the same directory.
Now I have some update in my codes and I want to upload my newest version to github, commit to master branch, but I cant find the way to do so with desktop client or command. I tried to directly upload the whole folder to github website but cannot because the folder have exceed upload limit of website upload: more than 100 files inside.I also tried git command like:
git push fypsubmission master fatal: 'fypsubmission' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Please let me know what should I do, thanks
See also questions close to this topic
How to fix "Unable to unlink old *: No such file or directory"?
I have cloned a branch from a remote repository:
git clone -b feature/feature1 http://..... git status On branch feature/feature1 Your branch is up to date with 'origin/feature/feature1' nothing to commit, working tree is clean
Now I am trying to use
git rebase -ito squash the two last commits:
git rebase -i HEAD~3 pick ... pick .... squash ...
However, I'm getting this error:
error: unable to unlink old 'file1': No such file or directory error: unable to unlink old 'file2': No such file or directory error: unable to unlink old 'file3': No such file or directory hint: Could not execute the todo command hint: hint: squash 3b6cabf2541e333d614c3cd5dbbb82a37037cc14 some commit hint: hint: It has been rescheduled; To edit the command before continuing, please hint: edit the todo list first: hint: hint: git rebase --edit-todo hint: git rebase --continue Could not apply 3b6cabf... some commit
Why do I get this error and how can I fix it?
Commit a single file in Visual Studio Professional 2017
I'm working with an application that is stored on Github. I'd like to commit a single file. It seems like this would be trivial but I don't see how it's done.
If I right click on the file I want to commit and select the Commit command, it seems to show that all modified files will be checked in. There is a Commit All button/dropdown that becomes enabled when I start entering a commit message. But the dropdown has no option to commit less than everything.
Surely this is supported.
How to sync code between AWS CodeCommit and GitLab?
The upstream is AWS Codecommit. So whenever code is pushed I want to pull it and then push it to a GitLab repository. Currently I'm doing this using a
cronjobon a local machine which needs to be available all the time. Can this be accomplished in any other way?
Using GitHub in a classroom
I'm going to be teaching a data journalism class next year to students with fairly weak coding and computer skills. I'm prepared to do the work necessary to guide them through using R to learn how to scrap data, make plots and maps and such.
However, I am thinking about how to enable them to work in groups.
Obviously GitHub is the place for collaborative work on projects, but, wow, it has a learning curve.
I am wondering if it would be possible for me to set up one repo for the entire class and then somehow have each group in the class have their own branches for their own projects so that I could kind of oversee the merges as they work on their projects.
I can see the merits of GitHub for this, but I am trying to make it as simple as possible.
Please note, I see that GitHub Classroom is a thing, but that really seems to facilitate grading and marking for large classes. That's not really what I need.
*****SSH key issue | Jenkins Container****
I am running Docker on Windows 7, and started Jenkins container via Kitematic. I am trying to git pull from Jenkins , but displaying ssh-key issue 'Unprotected Private Key'. The id_rsa* files have broader permission, trieng to change permission not impacting the changes. Whereas, I am perfectly able to clone from windows userprofile credential.
Can anyone suggest, what might I am wrong doing. Or is there some different approcah for proper ssh key permission for Jenkins running under container!
Thanks in advance!!!
git pull fails with "Either the application has not called WSAStartup, or WSAStartup failed"
I have just installed Windows 10, Visual Studio Community 2015, and Git for Windows. I also installed the latest Bitbucket and GitHub extensions.
Within Visual Studio I cloned my Bitbucket.com-hosted repository, and performed these operations successfully:
$ git --version git version 2.19.2.windows.1 $ git pull Already up to date.
But then when I tried to pull from another repository I got this error:
$ git pull git://github.com/aegif/CmisSync.git fatal: unable to lookup github.com (port 9418) (Either the application has not called WSAStartup, or WSAStartup failed. )
I am able to ping github.com though.
How can I investigate and fix the problem?
Trouble creating a new git repository on the GitHub Desktop app
I'm trying to create a new repository, but any location I select in my D:\ drive results in the message "This directory appears to be a Git repository. Would you like to add this repository instead?" The "Create repository" button is unresponsive. Not sure how to correct this.
how to cherry pick commits while push to the same branch
I have following commit ids in git log against my some feature branch.(feature/navigation)
git log --pretty=oneline 8fc7aeb 7b7809e 20d9bb2 7f302cb 9f0a3b5 fad0df5 011886a
If it was one commit the following command will do.
git push origin 7b7809e:feature/navigation
But here I am in need to push 4 commits which are not in order.
the commits that I need to pick from the above list are:-
How can I do this?? (Pushing commits on the same branch i.e., feature/navigation)
fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Bad file descriptor
I am working on Robot framework Automation project. All of a sudden git commit does not work I get below error on commit command
**fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Bad file descriptor**
I am working on Windows machine. I have done 4 commits till now and code is in Repo. With the latest changes, commit is not happening with above error I have gone through few issues quoted in stack-overflow regarding this but I could get it resolved.
Please help me in overcoming this issue
I use the command
git commit -a -m "description"or
git commit -m "description"
None of the sudo command work for me it says
> $ sudo chown -R useremail .git/ > bash: sudo: command not found
how do you download your repo as a file directory
I am trying to download a private git repo.
when I do
git clone https://<DEV_USER>:<DEV_PWD>@github.<corpName>.net/Svcs/repo.git
But I dont really need all the git history. I just need the repo as a file directory. Hence I was trying to archive.
git archive --remote=<DEV_USR>:<DEV_PWD>@github.<corpName>.net:Svcs/repo.git
I get the following error
Could not resolve hostname <DEV_USER>: nodename nor servname provided, or not known fatal: The remote end hung up unexpectedly