Why does gitlab freeze when I clone/pull my repo? - macos

i've created a private repo on gitlab.
from my office's macbook i can clone, pull, push and whatever, but here at home (with a little older macbook), when i try to clone the repo, it stuck on "compressing objects" with a different percentage each time...
no matter how big the repo is (i'm trying to clone a 5KB project..)
eg:
git clone git#gitlab.com:username/myproject.git
Cloning into 'myproject'...
remote: Counting objects: 24, done.
remote: Compressing objects: 26% (6/23)
i can leave it here for hours (actually i tried for about 30 minutes..)
but the only thing i can do is hit "ctrl+c" and kill the process, then it says
Killed by signal 2.
fatal: index-pack failed
i'm using:
OSX 10.9.4
git version 1.9.3 (Apple Git-50)
i tried also to create the folder, then
git init
git remote add origin git#gitlab.com:username/myproject.git
git pull
but the result still the same as cloning the whole project
btw.. searching online i found this answer ( https://stackoverflow.com/a/22798706/1294988 ) so i tried to execute:
git clone https://gitlab.com/0X1A/dotfiles.git
and it did it quick and easy! so what's wrong with mine?
any help?

Related

git pull added tons of untracked files and modified files

I am not very familiar with git as I just use it in the most basic manner. Lately I've been running into this strange behavior which makes no sense to me and causes a huge disturbance in my productivity. For certain branches when I run git pull instead of just getting the latest commits from the remote repository like I expect, I get an ENORMOUS list of modified/deleted/added files as well as an enormous list of untracked files. The branch I am pulling from is our team's master branch. I am just trying to keep my local copy of master in sync. What are these other untracked files showing up as well as these modified files? I didn't touch any of these other files.
What makes the problem worse is that I can't delete these untracked files or anything. I've tried `git clean -fx' and it only removes 3-4 files but still leaves hundreds. At this point I just want to get rid of all of these files, delete the branch, and pull the branch from remote again.
I tried doing the following:
git fetch --all
git reset --hard origin/<remote_branch_name>
but I received an error because Git couldn't create a symbolic link. I am using Git on Windows.
Why is git pull doing this, and what should I do?
EDIT: I was finally able to run the git reset command when I ran my prompt as an admin, but it still doesn't explain this weird git pull behavior.
It seems to me that the 'git pull' action did not complete successfully.
It is possible that you modified some of the files as an admin, and when pulling as non-admin user git tries to modify or delete a file and has no permissions to it.
Therefore you stay in some half baked state.
What do you see when you run git status?
Is there any error in the git pull?

Xcode Version control: fatal: cannot do a partial commit during a merge [duplicate]

This question already has an answer here:
Xcode Version control: fatal: cannot do a partial commit during a merge?
(1 answer)
Closed 4 years ago.
When using Xcode's Source Control, I get the following error after
pressing commit # Files and Push.
The working copy “Project” failed to commit files.
fatal: cannot do a partial commit during a merge.
I am using Xcode 9+. I have looked here but have not found anything that resolves the issue for Xcode's Source Control.
Thanks for the help.
You will have to use your terminal to resolve this. Xcode (as of Xcode 9) does not support many of the features in git e.g git stash.
Option 1 - Stage changes and commit using Xcode
Following this SO answer, try to stage all the local changes and repeat your steps with Xcode
Open up terminal
Navigate to project directory: cd /path/to/project
Stage all local changes: git add .
Open Xcode and try to commit again.
Option 2 - Stage and commit using terminal
If Option 1 did not resolve the issue, you can complete this task with terminal itself
Open up terminal
Navigate to project directory: cd /path/to/project
Stash your changes (IMP): git stash save name-this-stash
Reset code changes: git reset --hard HEAD~30
Pull the latest state of remote: git pull origin branch-name
Re-apply local changes: git stash apply
Check current status: git status
Stage changes to commit: git add file1 file2
Commit changes: git commit -m "commit-message"
Push changes to remote: git push origin branch-name
Hope it helps!

The working copy <Project name> failed to commit files. - The repository has an uncompleted operation

I've just updated my Xcode from 6 to 7 (and code from Swift 1.2 to Swift 2.0) and try to create new branch in Xcode. After that I can't push my code to Bitbucket.
Is there a way how can I delete repository from directory and setup Bitbucket again and maybe push to another (a new one) repository? Fix of this problem will be great, but I will be satisfied even with move to another repository.
I had this error in xcode 7.1 on a year old project that was working fine. In my case I have a project with the default local repository created by xcode. For anyone who is not going to re-install and re-setup. It is possible to find out what the dangling command is and fix it from command line.
To find the dangling command Open Terminal from the project directory:
xcrun git status
In my case the status returned:
On branch master
You are currently rebasing.
(all conflicts fixed: run "git rebase --continue")
To fix the problem I used:
xcrun git rebase --skip
In my case I ran git status which revealed that You are currently bisecting. (I was doing a bisect and must had forgotten to reset). I did a git bisect reset and attached the head to my latest commit and it was all fine afterwards.
When I am merging from currentBranchA into branchB, I got conflicts,I didn't want to solve the conflicts immediately and quit the merging process. But when I try to merge again, the Xcode shows "The working copy is currently in the middle of another operation..."
I opened the terminal ,cd to the project directory, and check the git status:
git status
it shows:
On branch currentBranchA
Your branch is up to date with 'origin/currentBranchA'.
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Just do it as it says. Continue to input
git commit and click Ctrl + C to close the commit message window.
The problem will be zero.
The problem was with installation of GitHub. I had a master repository. After reinstall and resetup everything works like before.
EDIT: For anyone who has a problem with Xcode and GIT I have a best advice. Don't use it. Use for example Source Tree
When you start developing for a living, you are gonna have to use more reliable solution for GIT. Imagine you have 70 branches. Using Source Tree you can easily solve conflicts and other things about working in team. Xcode GIT solution is not reliable and you are gonna be only frustrated.

rake gen_deploy rejected in Octopress

I installed Octopress in GitHub Pages.
And I clone the repository.
$ git clone git#github.com:my-name/my-name.github.io.git
$ git checkout source
And
$ rake setup_github_pages
I input my repository name.
And
$ rake gen_deploy
I got error
! [rejected] master -> master (non-fast-forward)
my solution
I resolve this problem, in GitHub delete my-name.github.io.git, and make same name repository and
$ rake gen_deploy
But I don't want to delete repository
What is the best solution?
Without deleting the repository
Please keep in mind this is not considered best practice, but it may work for you.
The solution is to force a push on the master branch.
Edit the Rakefile and look for this line:
system "git push origin #{deploy_branch}"
Alter the line by adding a plus (+) before the #{deploy_branch} tag:
system "git push origin +#{deploy_branch}"
Run the command
rake deploy
It should succeed.
Undo the edit you made to the Rakefile!
Idea for this solution came from reading this: https://stackoverflow.com/a/9629458/1369730
I have the same problem when hosting my Octopress blog on github pages. I Googled a lot and finally solved this problem.
Just change the directory.
cd octopress/_deploy
git pull origin master
cd ..
rake deploy
Then it's fixed.

Pull specific revision from master branch?

Im very new to Git and what I want to do with git within xcode is pull an older revision of my master (not commandline). Is this possible? I've looked in repositories under the organizer and i see all my commits there but i cant seem to load in one of them.
You can't go back to an earlier version of a repository from Xcode in Xcode 4. Older versions of Xcode allow you to go back to an earlier version of a repository, but older versions of Xcode lack git support.
I think that if you have cloned/pushed your repo all the stuff you need is on your local drive.
If you want to see how code looks in specific commit, do
git checkout branch_name
or
git checkout 14646bf1a76d08cbda99317c4faa8de0072d6975
where branch_name can be alias for checksum used by git, (like master or origin/master), if you want to list your branch checksums you can do that by
git log
or if you want it in GUI use qgit gitg or my favourite tig, or whatever you'll find to list your commits

Resources