git-clone

Clone a specific git branch through Xcode

試著忘記壹切 提交于 2021-02-10 14:18:06
问题 I am facing difficulties to clone a specific git branch from Apple Xcode? In Xcode -> Source Control -> Clone and insert my HTTP clone url and I can able clone only master branch but I did't find a solution to clone another developer branches from Xcode. Through below command using terminal I can able to clone specific git branch. git clone -b my_dev_branch_name https://gitlab.com/Username/projectname_ios.git But I don't know how to do this using Xcode so please let me help to achieve this

Git untracked/unstaged files right after clone

元气小坏坏 提交于 2021-02-08 08:14:13
问题 I make clone of a git repository, and right after it I get untracked and unstaged (modified/deleted) files in git status . Then I set fileMode=false for Mac, and several files go away from unstaged. But I cannot understand what to do with the others. I've tried a bunch of things from stackoverflow and other places, but nothing helps. So my question is why I get all these untracked / unstaged files right after cloning the repo, and how to fix it. I use Mac for development, but I've tried to

Git untracked/unstaged files right after clone

纵然是瞬间 提交于 2021-02-08 08:10:26
问题 I make clone of a git repository, and right after it I get untracked and unstaged (modified/deleted) files in git status . Then I set fileMode=false for Mac, and several files go away from unstaged. But I cannot understand what to do with the others. I've tried a bunch of things from stackoverflow and other places, but nothing helps. So my question is why I get all these untracked / unstaged files right after cloning the repo, and how to fix it. I use Mac for development, but I've tried to

Shallow clone cannot fetch new commits/branches?

一个人想着一个人 提交于 2021-02-05 12:18:07
问题 I have this: git clone --depth=1 <repo> app cd app git fetch origin git checkout a119b1076dd45a88a3609c4f7893ef3d82f9a4ee but it says: fatal: reference is not a tree: a119b1076dd45a88a3609c4f7893ef3d82f9a4ee if I use the name of the branch: git checkout me/work I get: error: pathspec 'me/work' did not match any file(s) known to git. is it because I did a shallow clone? don't make much sense to me. The commit is on the remote, at the very least the branch/commit with that name is on the remote

“bad config line 1” in config file when cloning

别等时光非礼了梦想. 提交于 2021-01-27 19:06:54
问题 I'm getting an error when cloning a bitbucket-hosted repository to my computer. When I enter in git bash: git clone https://myusername@bitbucket.org/groupname/repositoryname.git I get the message Cloning into 'repositoryname'.. fatal: bad config line 1 in file U://.../repositoryname/.git/config Unlink of file 'repositoryname/.git/config' failed. Should I try again? (y/n) The destination folder contains a .git subfolder, which itself contains the file config , along with a hooks subfolder

Clone a repo with submodules: override credentials

回眸只為那壹抹淺笑 提交于 2021-01-02 05:31:50
问题 I have to automate cloning a repository and fetching it's all submodules. The urls for repository submodules are specified at .gitmodules . If I were to go with defaults I would just do git clone --recursive https://username:password@url.git The problem is credentials aren't included in .gitmodules file and I am prompted for those when I clone. I have to use HTTPS rather then SSH. I tried to submit the credentials using git config: git clone https://username:password@url.git my_repo cd my

Empty Git submodule folder when repo cloned

两盒软妹~` 提交于 2020-12-27 07:28:38
问题 I have one repo hosted at https://github.com/aikiframework/json . On my local copy, I added a submodule using the command git submodule add git@github.com:jcubic/json-rpc.git json-rpc Then I did a commit and push, and the changes appear on GitHub (I can click on it). But when I clone the repo git clone https://github.com/aikiframework/json.git the submodule folder json-rpc is empty. What am I missing here? Did I forget about something? Why is that folder empty? 回答1: OK I found it, needed to