HEAD detached from origin/master
Everything starts with a problem trying to checkout your repository master branch:
git checkout master error: pathspec 'master' did not match any file(s) known to git.
Trying to checkout origin does not improve things, but at least is a step forward:
Using git in bitbucket without password
Look mom, without hands...
First, change this in your .git/config:
old url:
url = https://USER@bitbucket.org/hispamedios/PROJECT.git
new one:
url = ssh://USER.bitbucket.org/hispamedios/PROJECT.git
Edit your .ssh/config, in your local directory, and add this:
- Read more about Using git in bitbucket without password
- Log in or register to post comments
Deploying Drupal projects: git + capistrano
removing some folders from git, file .gitignore with these contents:
# Ignore paths that contain generated content.
cache/
files/
sites/*/files
sites/*/private
Using symbolic links for /files directory:
namespace:custom do
task:symlink do
run "ln -s /var/www/crucerista/sites/crucerista.net/files/ /var/www/crsta/current/sites/crucerista.net/"
run "echo 'finished'"
end
end
after "deploy","custom:symlink"
- Read more about Deploying Drupal projects: git + capistrano
- Log in or register to post comments
error: unable to create temporary sha1 filename ./objects/17: Permission denied
I have had this issue recently, with a git branch which did not want to to react to push. That's what a was having:
$ git pushgit@domain.net's password Counting objects: 5, done.
Delta compression using up to 2 threads.
ng objects: 100% (3/3), done.
Writing objects: 100% (3/3), 303 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
error: unable to create temporary sha1 filename ./objects/17: Permission denied
fatal: failed to write object
git Mini Howto
All you need to know to start faster in Git:
- sudo git add .
- sudo git commit -m "function findFriends added"
- git push -u origin master
That's it :-)
- Read more about git Mini Howto
- Log in or register to post comments
some git commands
try.github.com
sudo git reset --hard origin/8.x
issue summary template: http://drupal.org/node/1155816
http://core.drupalofficehours.org/
http://drupal.org/project/dreditor --> for chrome/firefox
Novice tags are good for starting to contribute.
Applying a patch in Drupal core:
1. Download the patch,
2. apply: git apply -v [patch]
- Read more about some git commands
- Log in or register to post comments
Upgrading two git repositories automatically
There is a simple way of upgrading or executing a command immediatly after a push has been done.
We just need to go to the server repository (the one which is going to receive the push), and enter in hooks (.git/hooks or hooks if it's a bare repository).
Then, we rename the post-receive.sample to post-receive, without extension, and add this content:
echo "********************"
echo "Post receive hook: Updating User Staging"
echo "********************"
cd ../live
GIT_DIR='.git'
git pull origin master
- Read more about Upgrading two git repositories automatically
- Log in or register to post comments
git Integration Manager Workflow tutorial
IN BLESSED
mkdir gitlab/blessedrepo
cd gitlab/blessedrepo
git init
Creating new files:
vim README
adding:
git add .
git commit -m "first file in blessed repository"
git push
IN DEVELOPERS
mkdir developer2
cd developer2
git clone /Users/air/gitlab/blessedrepo
ls
blessedrepo
ls blessedrepo/
README
cd blessedrepo
vim fileindev2.html
git add .
- Read more about git Integration Manager Workflow tutorial
- Log in or register to post comments
private git repositories in bitbucket
Let me got directly to the point. The bitbucket documentation is wrong, on the begining you are just suposed to do a git remote add origin
in the directory which you want to commit. But this will not work:
fatal: Not a git repository (or any of the parent directories): .git
Solution? Init the repository:
git init
git remote add origin https://ACCOUNT@bitbucket.org/ACCOUNT/REPOSITORY.git
- Read more about private git repositories in bitbucket
- Log in or register to post comments