I've made something wrong to my own git repository argh :/
Before I had 3 branches: master, layout and masscreate (all from me).
But now, I don't know what I've done wrong, my git master is the master of the rails repository?!?
When I switch to my master branch and make a git status, it shows me:
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 25732 and 239 different commit(s) each, respectively.
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
# ... some changes from my own code
I don't know whats happening if I commit now?!
I use GitX and it never showed me the rails branches.. But now there are beside my own branches, all the rails branches.. :/
EDIT:
git reflog --all shows me
a979775 refs/heads/masscreate#{0}: commit: Updated bitcoin client, removed unnecessary files, added mass create feature, updated gems
d2e2fb8 refs/heads/masscreate#{1}: commit: First commit
74fbbca refs/heads/3-1-stable#{0}: fetch --force --quiet --tags git://github.com/rails/rails.git refs/heads/*:refs/heads/*: storing head
4a065d5 refs/heads/master#{0}: fetch --force --quiet --tags git://github.com/rails/rails.git refs/heads/*:refs/heads/*: forced-update
5419222 refs/heads/layout#{0}: commit: First layout commit - not working
c42120e refs/heads/masscreate#{2}: branch: Created from master
11b0804 refs/heads/layout#{1}: commit: Test commit (with logo)
954297b refs/heads/layout#{2}: branch: Created from master
fd67735 refs/heads/3-0-stable#{0}: fetch --force --quiet --tags git://github.com/rails/rails.git refs/heads/*:refs/heads/*: storing head
afd7140 refs/heads/serializers#{0}: fetch --force --quiet --tags git://github.com/rails/rails.git refs/heads/*:refs/heads/*: storing head
ba70812 be6527f 7bf12a1 05386ce 471e1f1 7f60202 f40bbc9 57a01f3 162e13d 3c6cbad f8beca0 4f2c238 cf4d166 14e2fe2 fc9b521 aa11f73 9257a21 c6d13b6 d9d1bb2 db8db4a 188d21c 0ad5040 87
633a569 a19ee5c 66c3e31 f9b642c 09ad48f 4f15f39 b45dfc7 3480d97 fb4747b e0c03f8 e0774e4 refs/heads/2-3-stable#{0}: fetch --force --quiet --tags git://github.com/rails/rails.git r
dea5a10 c238ba0 11dafea bb99aa1 2330c0c ae69c4c 29d0ce0 4b4e67f f3f5a8f ebf0cc4 927d3c2 d8c6bab 0c3bdc0 4eac844 dbd72be 282ee95 92d3b51 073d9ff 9e9b127 388f09c 0ab65e8 458128d 35
ad16115 5e61d0b 15e2b58 refs/heads/3-0-9#{0}: fetch --force --quiet --tags git://github.com/rails/rails.git refs/heads/*:refs/heads/*: storing head
014008d d2b1340 7b04e50 a7039df 677df61 7f96566 b4b27a3 40dd641 95905c5 1f813d9 055a88d fa55293 f6fe174 b869b8c 71d7610 991e388 6cfd1c7 9267a43 190101e 8624996 5daef25 aeb7beb e5
d846f4b 6766caf e149861 f5f020b b7ea35d f8f00cc 2cbd024 da5122e 296ca01 ea8b05c 54f5fb5 96711aa a995911 654514a 69b25eb 8d758d8 645f138 a2a3413 377b15a b3b747d 1f02e3e 75fb26a f8
79abb70 1c079c5 f0c09f7 99cfdba d387a59 656e7b0 1d864e8 b102e60 d485633 177666e f236dbf 17c9efb c77bdc0 f505565 89252c4 da1ee0e 83f257f 872a9c1 3cbfc8c 5a6927e b648286 d79e284 65
e019587 0acc6bd 92537b8 c6c46e1 280a870 51f5209 af41d55 3b0f917 07fde1a 3e33592 3937296 389d15e 7a152ab 944b4d5 4f04452 9556e9c 9dfc215 49e7555 bb626e7 0675047 d0635b6 b14b058 ce
e9020b4 1c4db4d 18dde7b e6bc818 cb9e501 d907f3c 30264bb d7a5638 a9b4b5d 92e6255 3575782 ac07da8 f323a8f 284ca81 454ec93 b356172 16e5d15 4ac7196 3e24e9e 4c323bc 9bf5cdd bd3cdee a0
ee0b92e 631e23e cd44023 51414a0 1df3b65 9643243 ac86923 ea25224 08ef06d 2b4de66 4f7bdc8 e62b576 d9870d9 52f09ea 05bcb8c d55406d 5f1ea2a 30bba95 1193709 9f773d6 60da34b 933adce 0d
c6cb5a5 refs/heads/2-2-stable#{0}: fetch --force --quiet --tags git://github.com/rails/rails.git refs/heads/*:refs/heads/*: storing head
bcbff10 7a3f05f d152171 c4458b3 8aedd72 b7594a0 f1a15c2 115eedb ef79b91 bf24fe8 3ef6937 52c4755 8f88a28 9d87f41 421e06f 77e1a99 15e7134 3c6c240 100ab5b 1a05125 bbcdc86 a9163b5 d2
f5ed5c3 96183e0 5a898e1 11508db 002985f 25acd19 7963c30 bc821a5 22782e2 3fb493c 01ab6f9 aa508c9 37d7802 c7aea81 11558a1 72545da a2c52f1 43215de 959f857 f07cbec ab1a661 9c53e82 f3
588ac71 0a41ece c6db348 dbe0802 fca617a c40856c 23303d6 017840b a0ca3d1 23f6e51 ea2ad26 92f4cca dd55830 c017041 7ce1539 82a58ab 90176a6 c924068 bee4147 4b21dfe c11ba42 21063e5 22
5bf3294 8a09ea6 7f7480f 3cb5375 aa31a25 bfbdeea c6843e2 7d04a4b a7988fc 75b32a6 070c242 075f8b7 547199e 54250a5 52e526a f6d7a4d 201f373 8cc7463 5360014 227e1ca aeaa468 9e6e648 01
74206ae 774f596 5b1f4c5 ec017e1 5d979de e535b45 3570f3e 3568c5c ddadcc7 5de2e0d 24610c9 08fb1c4 0706bdc 5d7ad7b 22b020d 2de3646 f45714b 8e7a64d a447f76 6949d6f 0428917 6e4e95b 79
095cf91 a32eeeb 38d65b0 fb74a1b 26306f9 896475c 0489f0c 670281c af5b12c e1b1096 2ea1d68 4f37b97 91f65b7 7a48cd6 8a2cfe9 aeab739 47aebac b7c1fbc 1a0f822 314e18a 2ae84e0 c531bd6 ab
21c75e5 cae1d96 db4f421 8bbabd4 f254616 23e58a0 5457770 1a59aa5 4a643f6 25e139e e7ebd65 3025ff2 2920bd2 4e3ecec 1d5ea18 86cb0a6 4ff26f5 191ffc9 3028ca5 f3fd2b1 c55120c 6f0b012 c7
First, if you're concerned about losing any uncommitted work, save it somewhere else.
The git reflog command is a history of the changes made to the current branch head:
git reflog
will show, in reverse chronological order (newest at the top), every time the current branch head changed to a new commit id. From this list, you can choose which one you want, and use git reset --hard abc123 to reset the current branch head to that commit.
You can read more about the reflog at reflog, your safety net.
I found now a solution:
checked out the last working copy from github (here named as
backup)
compared the backup with a directory comparing tool
removed all references to the rails repository I found and set the .git/refs/head/master commit-hash to my last commit hash
And now it works again..
argh..
Related
I can no longer run either brew upgrade or brew update: both abort with
Error: homebrew-core is a shallow clone. To `brew update` first run:
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow
and if I follow this suggestion and run git ... --unshallow and then try brew update or brew upgrade I still get the same error message.
If I then try the command again (maybe I didn't do it right the first time?) I get
fatal: --unshallow on a complete repository does not make sense
How do I get past this error message to run brew upgrade or brew update without errors?
HOMEBREW_VERSION: 2.6.0-82-gde1afcb
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: de1afcbfc58fb3cd5779bd8fbb6b9995700dda4c
Last commit: 30 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: a7c63b0f7f7ae416a2f961b263155281759ac3a7
Core tap last commit: 29 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.FwPJPzeLfq/org.macosforge.xquartz:0
HOMEBREW_EDITOR: /usr/local/bin/bbedit
HOMEBREW_MAKE_JOBS: 4
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_EMOJI: set
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: quad-core 64-bit haswell
Clang: 12.0 build 1200
Git: 2.29.2 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_172
macOS: 10.15.7-x86_64
CLT: 12.0.32.27
Xcode: 12.2
XQuartz: 2.7.11 => /opt/X11
It's asking you to unshallow both homebrew-core and homebrew-cask with:
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" fetch --unshallow
Nothing worked with me until I did:
cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git
note: as of Feb 2023 Taps are now here:
/opt/homebrew/Library/Taps/homebrew
Seems that is has been a change in the Homebrew policy and there is not going to be a shallow clone any more.
The correct answer is unshallow, as requested —see Eric3 answer— or install it again, which is going to produce a unshallow / regular copy of the repo.
This worked for me.
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" fetch --unshallow
remote: Enumerating objects: 561296, done.
remote: Counting objects: 100% (561255/561255), done.
remote: Compressing objects: 100% (200847/200847), done.
remote: Total 552295 (delta 355423), reused 545449 (delta 348597), pack-reused 0
Receiving objects: 100% (552295/552295), 214.42 MiB | 2.60 MiB/s, done.
Resolving deltas: 100% (355423/355423), completed with 4915 local objects.
From https://github.com/Homebrew/homebrew-core
09e19b5c825..003302f81db master -> origin/master
remote: Enumerating objects: 180904, done.
remote: Counting objects: 100% (166460/166460), done.
remote: Compressing objects: 100% (47394/47394), done.
remote: Total 155334 (delta 116608), reused 146431 (delta 107784), pack-reused 0
Receiving objects: 100% (155334/155334), 73.84 MiB | 4.87 MiB/s, done.
Resolving deltas: 100% (116608/116608), completed with 6054 local objects.
From https://github.com/Homebrew/homebrew-cask
It's so simple: I am trying to use gitversion to manage semver and I am getting completely different behavior on the same repo/branch/commit between windows and mac. I am hoping someone can explain because I can't manage a version bump without it.
mac:
cbongiorno at 5cg4461z2l in ~/dev/adaptors on master [$]
$ git log -1 --pretty=oneline
e7592b7703792069e4f1a69317ef50fa1deae2eb (HEAD -> master, origin/master) PE20-165 - fix the command, again!
cbongiorno at 5cg4461z2l in ~/dev/adaptors on master [$]
$ gitversion /version
5.1.3+Branch.master.Sha.bef8ebc0b62b3ddd0cdafe09b66d68bbfcaf90d5
cbongiorno at 5cg4461z2l in ~/dev/adaptors on master [$]
$ git rev-parse --abbrev-ref HEAD
master
cbongiorno at 5cg4461z2l in ~/dev/adaptors on master [$]
$ gitversion
{
"Major":0,
"Minor":2,
"Patch":1,
"PreReleaseTag":"",
"PreReleaseTagWithDash":"",
"PreReleaseLabel":"",
"PreReleaseNumber":"",
"WeightedPreReleaseNumber":"",
"BuildMetaData":19,
"BuildMetaDataPadded":"0019",
"FullBuildMetaData":"19.Branch.master.Sha.e7592b7703792069e4f1a69317ef50fa1deae2eb",
"MajorMinorPatch":"0.2.1",
"SemVer":"0.2.1",
"LegacySemVer":"0.2.1",
"LegacySemVerPadded":"0.2.1",
"AssemblySemVer":"0.2.1.0",
"AssemblySemFileVer":"0.2.1.0",
"FullSemVer":"0.2.1+19",
"InformationalVersion":"0.2.1+19.Branch.master.Sha.e7592b7703792069e4f1a69317ef50fa1deae2eb",
"BranchName":"master",
"Sha":"e7592b7703792069e4f1a69317ef50fa1deae2eb",
"ShortSha":"e7592b7",
"NuGetVersionV2":"0.2.1",
"NuGetVersion":"0.2.1",
"NuGetPreReleaseTagV2":"",
"NuGetPreReleaseTag":"",
"VersionSourceSha":"800649c8102414d2513a19253ff2a4caadafb2ab",
"CommitsSinceVersionSource":19,
"CommitsSinceVersionSourcePadded":"0019",
"CommitDate":"2020-02-20"
}
Windows:
PS C:\Users\cbongiorno> cd E:\SysData\Jenkins\workspace\chb0_chb0mb_master
PS E:\SysData\Jenkins\workspace\chb0_chb0mb_master> git log -1 --pretty=oneline
e7592b7703792069e4f1a69317ef50fa1deae2eb (HEAD -> master, tag: 0.1.0, origin/master) PE20-165 - fix the command, again!
PS E:\SysData\Jenkins\workspace\chb0_chb0mb_master> gitversion /version
5.1.3+Branch.master.Sha.bef8ebc0b62b3ddd0cdafe09b66d68bbfcaf90d5
PS E:\SysData\Jenkins\workspace\chb0_chb0mb_master> gitversion
{
"Major":0,
"Minor":1,
"Patch":0,
"PreReleaseTag":"",
"PreReleaseTagWithDash":"",
"PreReleaseLabel":"",
"PreReleaseNumber":"",
"WeightedPreReleaseNumber":"",
"BuildMetaData":"",
"BuildMetaDataPadded":"",
"FullBuildMetaData":"Branch.master.Sha.e7592b7703792069e4f1a69317ef50fa1deae2eb",
"MajorMinorPatch":"0.1.0",
"SemVer":"0.1.0",
"LegacySemVer":"0.1.0",
"LegacySemVerPadded":"0.1.0",
"AssemblySemVer":"0.1.0.0",
"AssemblySemFileVer":"0.1.0.0",
"FullSemVer":"0.1.0",
"InformationalVersion":"0.1.0+Branch.master.Sha.e7592b7703792069e4f1a69317ef50fa1deae2eb",
"BranchName":"master",
"Sha":"e7592b7703792069e4f1a69317ef50fa1deae2eb",
"ShortSha":"e7592b7",
"NuGetVersionV2":"0.1.0",
"NuGetVersion":"0.1.0",
"NuGetPreReleaseTagV2":"",
"NuGetPreReleaseTag":"",
"VersionSourceSha":"e7592b7703792069e4f1a69317ef50fa1deae2eb",
"CommitsSinceVersionSource":92,
"CommitsSinceVersionSourcePadded":"0092",
"CommitDate":"2020-02-20"
}
PS E:\SysData\Jenkins\workspace\chb0_chb0mb_master> git rev-parse --abbrev-ref HEAD
master
The version numbers are totally different even though I am dealing with the same repo/commit. This HAS to be a bug.
Can anyone explain this?
I have created spec/lint/rubocop_spec.rb which runs Rubocop style checker on the files changed between current branch and master. This works when I test locally but not when the test run on the build server Circle.ci.
I suspect it is because only the branch in question is downloaded, so it does not find any differences between master. Is there a better way than git co master && git pull origin master?
Can I query the Github API perhaps to get the files changed listed?
require 'spec_helper'
describe 'Check that the files we have changed have correct syntax' do
before do
current_sha = `git rev-parse --verify HEAD`.strip!
files = `git diff master #{current_sha} --name-only | grep .rb`
files.tr!("\n", ' ')
#report = 'nada'
if files.present?
puts "Changed files: #{files}"
#report = `rubocop #{files}`
puts "Report: #{#report}"
end
end
it { #report.match('Offenses').should_not be true }
end
You don't have to use github api, or even ruby (unless you want to wrap the responses) you can just run:
git fetch && git diff-tree -r --no-commit-id --name-only master#\{u\} head | xargs ls -1 2>/dev/null | xargs rubocop --force-exclusion
see http://www.red56.uk/2017/03/26/running-rubocop-on-changed-files/ for longer write-up of this
I fixed it by querying api.github.com.
This will run rubocop on all files that has been changed between current_sha and the master branch.
require 'spec_helper'
describe 'Check that the files we have changed have correct syntax' do
before do
current_sha = `git rev-parse --verify HEAD`.strip!
token = 'YOUR GITHUB TOKEN'
url = 'https://api.github.com/repos/orwapp/orwapp/compare/' \
"master...#{current_sha}?access_token=#{token}"
files = `curl -i #{url} | grep filename | cut -f2 -d: | grep \.rb | tr '"', '\ '`
files.tr!("\n", ' ')
#report = 'nada'
if files.present?
puts "Changed files: #{files}"
#report = `rubocop #{files}`
puts "Report: #{#report}"
end
end
it { expect(#report.match('Offenses')).to be_falsey }
end
I found https://github.com/m4i/rubocop-git which works very well. However it works on your git diff (optionally with --cached) so it does not allow you to compare branches.
I don't have high enough reputation to comment on an answer, so I am posting an answer to add a refinement I found useful:
git fetch && git diff-tree -r --no-commit-id --name-only master#\{u\} HEAD | xargs ls -1 2>/dev/null | grep '\.rb$' | xargs bundle exec rubocop --force-exclusion
The addition of --force-exclusion makes RuboCop respect the Exclude declarations in its config file (here using the default ./.rubocop.yml). You put those declarations in for a reason, right?! ;)
Here's another alternative that compares the current branch to origin/master (should work with any repo hosting - just tried it on circleci with a bitbucket repo). It also passes a .rubocop.yml config file option (you can remove that part if you don't need it).
require 'spec_helper'
RSpec.describe 'Check that the files we have changed have correct syntax' do
before do
current_sha = 'origin/master..HEAD'
#files = `git diff-tree --no-commit-id --name-only -r #{current_sha} | grep .rb`
#files.tr!("\n", ' ')
end
it 'runs rubocop on changed ruby files' do
if #files.empty?
puts "Linting not performed. No ruby files changed."
else
puts "Running rubocop for changed files: #{#files}"
result = system "bundle exec rubocop --config .rubocop.yml --fail-level warn #{#files}"
expect(result).to be(true)
end
end
end
Original gist here: https://gist.github.com/djburdick/5104d15f612c15dde65f#gistcomment-2029606
One simpler solution:
git diff origin/master --name-only | xargs rubocop --force-exclusion
Explanation: I rarely have master up to date locally, but doing git fetch updates origin/master so I want to diff against that. I can't get the other proposed solutions with diff-tree and origin/master to work.
Maybe you could leverage CircleCI’s dynamic configuration feature.
There is a specific guide on how to execute specific workflows or steps based on which files are modified (https://circleci.com/docs/using-dynamic-configuration/#execute-specific-workflows-or-steps-based-on-which-files-are-modified).
I tried to commit some changes in my app, and received an error that the development log was too big at 512MB. I deleted the development log file and tried again, and the same error showed up with a log size of 103.2MB. I also tried rake log:clear with the same error.
Apparently the development log file is getting rewritten. I have never used the logs and would probably not miss them...is there a way to commit to git and not rewrite the development log?
2 files changed, 0 insertions(+), 1096498 deletions(-)
rewrite log/development.log (100%)
rewrite log/production.log (100%)
[master]~/Projects/schoolsapi: git push origin master
Username:
Password:
Counting objects: 26, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (15/15), done.
Writing objects: 100% (17/17), 6.90 MiB | 322 KiB/s, done.
Total 17 (delta 7), reused 0 (delta 0)
remote: Error code: 026c4e06d174bf5b0e51c754dc9459b0
remote: warning: Error GH413: Large files detected.
remote: warning: See http://git.io/iEPt8g for more information.
remote: error: File log/development.log is 103.32 MB; this exceeds GitHub's file size limit of 100 MB
Update after trying suggestions from answers 1 and 2 below:
The problem still exists. I've removed the log file from the git repo, and my local machine, inserted the .gitignore file and updated development.rb with the config logger bit. The last two lines below show that the development.log file does not exist in git or my local machine.
master]~/Projects/schoolsapi: git add .
[master]~/Projects/schoolsapi: git commit -m"Tried config logger per apnea diving"
[master b83b259] Tried config logger per apnea diving
2 files changed, 4 insertions(+), 0 deletions(-)
create mode 100644 .gitignore
[master]~/Projects/schoolsapi: git push origin master
Username:
Password:
Counting objects: 38, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (23/23), done.
Writing objects: 100% (26/26), 6.90 MiB | 525 KiB/s, done.
Total 26 (delta 12), reused 0 (delta 0)
remote: Error code: e69d138ee720f7bcb8112e0e7ec03470
remote: warning: Error GH413: Large files detected.
remote: warning: See http://git.io/iEPt8g for more information.
remote: error: File log/development.log is 103.32 MB; this exceeds GitHub's file size limit of 100 MB
[master]~/Projects/schoolsapi: rm log/development.log
rm: log/development.log: No such file or directory
[master]~/Projects/schoolsapi: git rm log/development.log
fatal: pathspec 'log/development.log' did not match any files
[master]~/Projects/schoolsapi:
UPDATE
I had earlier commits which still had the log/development.log file. Using this code provided by the selected answer below (huge thanks to this person), the problem was fixed with one small caveat:
git filter-branch --index-filter 'git rm --cached --ignore-unmatch log/development.log' --tag-name-filter cat -- --all
The caveat is that I had to use git push origin +master to override git's automatic rejection of non-fast-forward-updates. I was comfortable doing this because I am the only person working on this app. See this question:
Git non-fast-forward rejected
It seems you have earlier added/checked-in your development.log file into the git repo.
You need to remove it, and make a commit.
git rm log/development.log
git commit -m "removed log file"
In general, you should put your log directory into your .gitignore file
echo log >> .gitignore
And to completely remove all the log files (in case others were added)
git rm -r --cached log
git commit -m "removed log file"
Github has recently started enforcing a 100MB limit for maximum file sizes. https://help.github.com/articles/working-with-large-files
Edit:
It seems you have previous commits which weren't pushed to github locally.
Try running
git filter-branch --index-filter 'git rm --cached --ignore-unmatch log/development.log' --tag-name-filter cat -- --all
Side answer to prevent the file to expand on your own disk, simply log to STDOUT in development.rb:
config.logger = Logger.new(STDOUT)
You'll keep logs on your server page, but the file won't be populated anymore.
Capistrano and Git worked properly till I moved my site to another server. My first attempt to deploy went wrong because of an SSH-known-hosts related problem.
Even if I managed to solve this problem, another one raised and I can't deploy any more:
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote collimarco#mywebsite.com:/home/collimarco/git/foto-fiori.git master"
* executing "if [ -d /home/collimarco/mywebsite.com/shared/cached-copy ]; then cd /home/collimarco/mywebsite.com/shared/cached-copy && git fetch origin && git reset --hard 7de27a6a1de7a94508f943596413e5e0f217f57e; else git clone --depth 1 collimarco#mywebsite.com:/home/collimarco/git/foto-fiori.git /home/collimarco/mywebsite.com/shared/cached-copy && cd /home/collimarco/mywebsite.com/shared/cached-copy && git checkout -b deploy 7de27a6a1de7a94508f943596413e5e0f217f57e; fi"
servers: ["mywebsite.com"]
[mywebsite.com] executing command
** [mywebsite.com :: out] * refusing to create funny ref 'remotes/origin/*' locally
** [mywebsite.com :: out] collimarco#mywebsite.com's password:
Password:
** [mywebsite.com :: out]
** [mywebsite.com :: out] fatal: Needed a single revision
command finished
*** [deploy:update_code] rolling back
* executing "rm -rf /home/collimarco/mywebsite.com/releases/20091027191027; true"
servers: ["mywebsite.com"]
[mywebsite.com] executing command
command finished
failed: "sh -c \"if [ -d /home/collimarco/mywebsite.com/shared/cached-copy ]; then cd /home/collimarco/mywebsite.com/shared/cached-copy && git fetch origin && git reset --hard 7de27a6a1de7a94508f943596413e5e0f217f57e; else git clone --depth 1 collimarco#mywebsite.com:/home/collimarco/git/foto-fiori.git /home/collimarco/mywebsite.com/shared/cached-copy && cd /home/collimarco/mywebsite.com/shared/cached-copy && git checkout -b deploy 7de27a6a1de7a94508f943596413e5e0f217f57e; fi\"" on mywebsite.com
My git repository seems intact: why do I get "Needed a single revision"?
Any suggestion is greatly appreciated.
Thanks in advance!
UPDATE: someone suggested to remove the remote cache, how do I do that?
UPDATE: I have renamed shared/cached-copy into shared/cached-copy-old.
Then I have created a shared/cached-copy empty folder.
Now I get "Not a git repository":
http://pastie.org/672254.txt
Check your git versions on the client and the server; I bet you need to update one of them to 1.6.