I am running my own instance of a Gitlab-CE server with the following fairly-up-to-date specs:
Gitlab Version 10.8.4
Gitlab Shell 7.1.2
Gitlab Workhorse v4.2.1
Now my problem is that when I add a message to my commits referencing an issue, there is no commit mention in the issue as there should be.
As an example: git commit -m "handled issue #12" and the obligatory git push does not add anything to issue 12.
Any idea as to where the problem could be?
Edit: added the information that I am already pushing to the remote.
Found it: turns out that I had forgotten to change back my email adresse back to the one used in the remote repo – I had it changed locally a few weeks ago to test s.th.
So due to using my ssh key committing worked, but it showed the wrong user in my commits (which should have been a good hint for me as to what's up...) and due to that user not being a member of the project I had no access to the issues (at least that's my conclusion here).
Hope this might help anyone silly enough to run into similar issues...
git commit just creates a local commit in your branch. If you want GitLab to be aware of it, you need to push it:
$ git push origin my-branch
Related
Since this morning I have a problem for committing my work :
I tried several commands to clean up my local repo but I still have the same problem, I have searched well in other topics where the problems encountered were similar to mine but the solutions differ without me being able to adapt anything ...
I await your answers
PS : Sorry for my lack of courtesy but obviously Stack Overflow does not want me to greet you ...
Actually it's not clear what you want to achieve exactly but to add the open change for committing just use
git add conFusion
Then you can commit again.
git commit -m "your description"
And finally push with
git push origin master
wheras origin master never seems to be required in your situation, so just git push will likely be enough.
I'm not sure why git commit -a didn't work, but the reason might be that the message with the parameter -m was missing.
Here you can find documentation about
git add
git commit
git push
I am fairly new to SourceTree, so apologies if this question appears stupid... I have much more experience from VSC, but I think SourceTree works in a different way. I use SourceTree under Windows 10. The central repository is at bitbucket.org.
I have failed for creating a new branch. I added SSH key and cloning repositories locally, this did work good but I have faced with this problem. All help will be appreciated.
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks branch
fatal: Not a valid object name: 'master'.
I fixed the issue and just wanted to let you guys know if anyone else having a problem with this one. When I tried to pull working copy of master, SourceTree was creating a .git/index.lock file. But this file was already existed for me.
Solution is, remove it and try to pull or create a new branch again.
So go to start and open git bash, use following command;
$ rm .git/index.lock
TA DA!
Open SourceTree again, pull or create a new branch. It should work now.
One project of mine stopped showing history or reacting to push events in any way after upgrading to gitlab version 8.3.2 (but it could also be on previous versions as we update frequently).
I'm using a plain gitlab docker installation. Is there a way to let gitlab reload the commit history ?
UPDATE:
This is happening on serval projects not just one, but until now there's no common factor between them apart from having recently enabled CI and being imported from an external git repository.
Finally I got it!
The cause of this behavior was that the git repository was imported with the wrong directory structure.
It was:
repository.git/
|
+-> .git/<bare-repo-content>
Instead of just:
repository.git/<bare-repo-content>
The fix was to simply rename and move the bare repo:
mv repository.git/.git tmp.git
rm -rf repository.git
mv tmp.git repository.git
I was unable to git commit on an old Synology DS-106j for a while. After asking this question here a while back, I followed the suggested alternative till I found out that I now need to use git on the platform. (I am currently writing a program for it.) Fortunately, I found a way to get an updated version of git for the platform, but the issue is still there even after the update. Below is a short version of what happened:
git init
git add .
git commit -m "Testing"
fatal: d7fae4dbad5534fed92205ff4a9cc1152b013c8b is not a valid object
I tried again by deleting the .git directory; yet, the similar result shows. In the previous question, it is possible that it may be a version problem since I was running git version 1.8.4.2-1, but the problem still persist after updated to version 2.3.7.
The strange part is that I tested git version 2.3.5 on a newer Synology DS-212j and it works perfectly fine. Maybe that my old platform is missing a dependency or something of that sort?
First of all, I am a noob at using git.
I was working on a project and did a commit and pushed to remote github repository.
But, then later I realized that I did some mistake, so I did $git --amend -am "My message"
Now, I was not able to push again to the remote server as I was getting error. So, I thought of deleting the remote github repo & recreated the same with the same name.
Now, when I try to push, it says "Everything up-to-date".
Please guide as to how do I solve this?
Sounds like two things have gone wrong, here.
First up, you amended a commit that had become part of the remote repository's history, which is a bit of a no-no. Rather than re-answer this gripe, I'll direct you to the answer: How do I push amended commit to the remote Git repository?
Next, chances are that even though you re-created the remote repository, your local repository still has the local history from the old one. what you'll want to do is run git remote rm origin, then git gc, then git remote add origin <path_to_repo>, then finally git fetch origin. This should pick up the new remote repository, and allow you to push your changes to it.