GitHub Boxen Error - github

I'm not the biggest user of GitHub and when I try and install their new "boxen" (https://github.com/boxen/our-boxen) I'm having issues.
The README.md has instructions and I'm getting an error when running
git checkout -b master upstream/master
Any ideas? I created a local repo if that's any difference, or would I need to make one on GitHub?
Error message:
fatal: This operation must be run in a work tree

Related

Error while creating Branch in VS Code post cloning in VS Code and error during Cloning in VS Code repo

When I am cloning a repository from DevOps to VS Code [ver 1.71.0] I am getting:
VS Code error stating:
[ "Git:remote:Azure Repos" ]
Below is error during cloning repo frm Devops in VScode-
Downloading web/__image_snapshots__/FlatrisGame-FlatrisGame-snap.png (32 KB)
Error downloading object: web/__image_snapshots__/FlatrisGame-FlatrisGame-snap.png (7980b8e): Smudge error: Error downloading web/__image_snapshots__/FlatrisGame-FlatrisGame-snap.png (7980b8eaaa00e44c5d48503f90718ddb72ff095a922a50448783c9b89737ca98): [7980b8eaaa00e44c5d48503f90718ddb72ff095a922a50448783c9b89737ca98] LFS object not found: [404] LFS object not found
Errors logged to 'C:\Devops\flatrisVB\.git\lfs\logs\20221108T071419.4210913.log'.
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: web/__image_snapshots__/FlatrisGame-FlatrisGame-snap.png: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
As it clones and restores all file on local folder which I then add in Visual Studio Code.
When I now try to use CTRL+Shift+P and give git create branch command on Repo and try specify New Branch name I get following error which fails to create new Branch ["Git: The Following untracked working tree files would be overwritten by checkout" ] and it fails to create new branch
Would appreciate if any one has experienced same problem and how do we resolve this. I am using Azure VM win 2022 server. I have installed Git and configured Name and email-id .NodeJs is also installed.
I was expecting no error during cloning Repo from Azure Devops in VSCode.
Also I am not able to create New Branch for imported repo.
I tried to re-import different Repo's from GitHub to Devops and then in VS Code but ended with same 2 problems mentioned above.
[Solution for Query No 3]With my trial and error i was able to figure out resolution for problem where i was not able to create new branch from "master" in VSCode post cloning Repo from DevOps.
i am not sure whether we need to do this but this is what works in VS code . I found out that post cloning Repo in VSCode if we do "commit" and then try to create new Branch it works and allows me to create new branch and work...
I know we normally do commit post we update any changes in Branch ..but this workflow resolved my issues as i created multiple branches did some test changes..did commit and publish that new branch back to DevOps and created Pull request ...all works fine...
So this is resolution that worked for point 3 query mentioned above ..
I am still working to resolve Query no 1 where i get error during Cloning Repo from DevOps..

Error " pathspec '–-recursive' did not match any file(s) known to git" when running submodule update

I am trying to update submodules in a repo. I have successfully cloned the repo and used git checkout to successfully switch to the correct branch I need to be on. When I run git submodule update --init -–recursive in that branch I get the following:
error: pathspec '–-recursive' did not match any file(s) known to git.
I have previously followed this process on a Macbook pro and did not get an error, but am currently getting the error on Windows. I have the latest version of Git installed (2.32.0). I first considered that this could be a Github SSH key issue, but I have confirmed that it asks for my SSH passphrase and proceeds with the cloning to my local machine, so probably not security related. The Git documentation states that this submodule update is mostly foolproof, so I'm unsure where to go from here. I've also tried running git submodule foreach git pull origin master before the submodule update
and same error. Any assistance is appreciated.
pathspec '–-recursive' means it interprets what should be an option as a filename/filepath instead.
Double-check your '-' (in case they are 'minus' instead of the regular 'hyphen-minus')
Make sure you are using the latest Git for Windows (2.33.0 from today)

Cannot submit a pull request in angular/angular

I discovered a minor bug in Angular's code, opened an issue on GitHub ( https://github.com/angular/angular/issues/19078 ) and now I am asked to submit a pull request but I'm not a "git pro" and however I try it doesn't work out.
What I did:
I read the guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-a-pull-request-pr
signed Google's CLA.
cloned the repo using: git clone https://github.com/angular/angular.git (was it necessary?)
edited the buggy file. (but without having the files, this step wouldn't have been possible, right?)
made my changes in a new git branch: git checkout -b my-fix-branch master
commited my changes: git commit -a
VIM opened, I put in a message, closed the editor.
commit seemed to be successful because in the terminal I see: [my-fix-branch 24f1f306e] docs typo fix 1 file changed, 1 insertion(+), 1 deletion(-)
tried to push it: git push origin my-fix-branch
typed in my GitHub credentials.
And now I face the error message: remote: Permission to angular/angular.git denied to swirlsky.
fatal: unable to access 'https://github.com/angular/angular.git/': The requested URL returned error: 403
First I should complete this, and only after that I should open a pull request on GitHub, otherwise how could they know what changes I made in the code, right? ...and for that, will this one be the appropriate page: https://github.com/angular/angular/compare/master...4.4.x ?
You have to fork angular using the fork button on the top right corner
You will have a new repo at yourusername/angular, work and push on it.
Then, you'll be able to submit a pull request

Forking Rails Tutorial sample_app for Rails 4

I'm trying to fork Michael Hartl's sample_app_rails_4 (https://github.com/railstutorial/sample_app_rails_4). I keep getting the error message:
'fatal: Could not read from remote repository.Please make sure you
have the correct access rights and the repository exists'
after entering the following commands.
$ cd /tmp
$ git clone git#github.com:railstutorial/sample_app_rails_4.git
I appreciate any help in getting this (seemingly simple) step to work.
It looks like SSH is not an option on that repository. Try
git clone https://github.com/railstutorial/sample_app_rails_4.git
Not actually forking, but that worked for me.
You need to fork the repo, get it in your personal GitHub repository, and then clone the version that is in your personal repo. Here is a GitHub article on forking and cloning: https://help.github.com/articles/fork-a-repo
Here are the steps at a high level:
Go to Hartl's repo and click fork. This will copy the project in your GitHub account.
Clone the repo from your personal account:
$ git clone git#github.com:your_github_usernamesample_app_rails_4.git

GitHub "ERROR: Repository not found" when installing Octopress

I followed the guide at http://octopress.org/docs/deploying/github/ to the letter, but when I get to the "rake deploy" part, I get this:
## Deploying branch to Github Pages
rm -rf _deploy/index.html
## copying public to _deploy
cp -r public/. _deploy
cd _deploy
## Commiting: Site updated at 2012-08-21 18:04:11 UTC
[master 84293e9] Site updated at 2012-08-21 18:04:11 UTC
61 files changed, 2658 insertions(+), 1 deletion(-)
create mode 100644 assets/jwplayer/glow/controlbar/background.png
create mode 100644 assets/jwplayer/glow/controlbar/blankButton.png
(...etc)
## Pushing generated _deploy website
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
## Github Pages deploy complete
cd -
Any ideas where I went wrong, or how to fix it?
Thanks!
I have just encountered the same problem.
I guess in the following step,you exactly do what the shell prompt tell you do:
chienlung#chienlung:~/octopress$ rake setup_github_pages
Enter the read/write url for your repository
(For example, 'git#github.com:your_username/your_username.github.com)
Repository url: git#github.com:Chienlung/chienlung.github.com
The shell promt about the repo url is wrong, if you follow it ,you will encounter the error:
## Pushing generated _deploy website
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
The right “Repository url” should be :git#github.com:Chienlung/chienlung.github.com.git
You should add '.git' at the end.
Try again with that URL, hopefully this helps.
祝你好运!
(Another:before you deploy your octopress, make sure that you have generated your SSH KEY.
About generating SSH Keys,see https://help.github.com/articles/generating-ssh-keys)
I managed to remove this error.
assuming you have installed ruby 1.9.3
Create repo on github as username.github.com
cd your_working_dir
rake install / rake install['theme_name']
rake setup_github_pages
this will ask for repository name. Do not append ".git"
e.g. git#github.com:username/username.github.com is perfectly fine.
Now add your remote repo, check available repo using
git remote -v
octopress git://github.com/imathis/octopress.git (fetch)
octopress git://github.com/imathis/octopress.git (push)
Add your repo
git remote add origin git#github.com:username/username.github.com.git
Rename branch master to source, because github pages publishes only source branch
git branch
* master
git branch -m master source
git branch
* source
time to preview
rake preview
open browser and goto localhost:4000
if all is well then push to github
rake generate
git add .
git commit -m "first blog"
git push origin source
rake deploy
as per your description, I think it's a git connection issue.
Just refer to one of your successfully connected project, go to .git/config and see the value 'url' key.
I got the same issue while I tried the formal steps with octopress, it generated wrong url, so I updated it to
url = ssh://git#github.com/AndyEverLie/andyeverlie.github.com.git
in [remote "origin"] section, then run 'rake deploy', it works!
my env:
git version 1.7.0.4
ruby 1.9.3p194 (2012-04-20) [x86_64-linux]
Wish this helps :)
Make sure you provide the rake task the correct url- the example url has .io trailing but the github pages url will likely have .com instead.
I also found that the rake task generates a .git/config where the remote origin branch url ends with .io, which should be changed to .com.git to allow you to push up your source code on the 'source' branch the rake task creates.