another little issue with my current choice of IDE , Bluej. I have set it up to be able to share a project (namely to commit and push changes) using GIT,and specifically through a gitlab repository.
After the first couple of successful pushes and commits(two weeks ago), I changed some code today, tried to do exactly the same procedure, and alas, the button OK in bluej to actually push the changes, is not active!
I have checked connection by entering password, all looks fine. Also, commits are happening fine locally, but when I try to push them through the TeamWorks of Bluej, the OK button remains inactive.
ps: a restart of the program did not solve the issue.
In that case:
switch to the command-line,
go to your repository folder,
and do a git fetch + git status
That should show you why a simple git push is not possible (possibly because you need to pull first)
Related
in my new project I can't close Gitlab issue's automatically via commit. this is what I try to do:
git add .
git commit -m "close #32"
git push origin develop
in my previous project when I try this codes, issue closed automatically in Gitlab.
what should I do?
First, make sure the commit closing the issue is not the very first commit.
As documented in gitlab-org/gitlab-foss issue 54722, it would not work. By design.
Check if another new commit, with the same comment, works better.
If not, check the GitLab server log for any error mentioning a failure to process the commit comments.
Possibly the feature is disabled from GitLab for certain reason.
Go to GitLab -> Your Project -> Settings -> Repository and see the below screenshot. As seen, the checkbox needs to be enabled in order to avail the auto close functionality based on the reference in the commit message.
I am currently doing an end of year project and we're using GitLab. This is the first time I am using this and was confident about it until the following problem occurred.
After creating the clone, I've been working on my project and committed quite a few files to the school server by using git push after doing the prerequisites of git add and etc.
Now, I've decided to completely start again. I deleted everything manually from GitLab and then all the files from within the folder where the clone directs to. I started working on my new work in a separate folder - while still working on my new file, I decided to move all the files to the previous file where I deleted everything, where the clone was originally set for GitLab to save my files within the schools server.
When typing git status, the following appears (Please excuse the picture instead of me inserting the code in here. I tried entering the output on the console in here but was having editing problems).
I don't understand how to fully delete everything. So, I want to get rid of all Changes to be committed: and Untracked files:.
If you want to push there nothing to do with git status . git status only shows what been added to your repository before commit.
I am having a build issue on travis with my node.js project. The issue stems from the fact that I have a rather complex test that I want to run, which requires building and running some test scaffolding framework on the VM before I get to 'npm test'. Somewhere along the line it is failing, and I find myself adding debugging statements to my .travis.yml to try to root out the problem, but its annoying to have my commit history littered with these changes/attempted fixes.
I guess I want to be able to either (a) get on the travis box at the time the test is running (or afterwards) so I can inspect what is going on/went wrong, or (b) at least be able to tweak and run my .travis.yml file and associated scripts somehow and re-run immediately without having to formally check those changes in in order to kick off travis again.
I find myself adding debugging statements to my .travis.yml to try to root out the problem, but its annoying to have my commit history littered with these changes/attempted fixes.
If the history is important, maybe because your changelog is generated from it, then my suggestion is, to create a private sandbox for experiments by cloning the repo.
clone a organization repo to a user repo.
activate travis on the user repo
try and error commit as long as you need to your .travis.yml
when everything is working like you want, squash the git commits into 1
do a pull request of this single commit from user repo to company repo
et voila: history stays clean
Big Warning: When you have no contributors with forks to worry about, then you could simply commit till you get it right and squash the history into a single commit and do a force push.
get on the travis box at the time the test is running (or afterwards) so I can inspect what is going on/went wrong
That's not possible. But you can view or download the log from the builds.
If you view the build log directly after a push, then you get live view of the processing steps on the Travis env. You can also cancel it manually.
at least be able to tweak and run my .travis.yml file and associated scripts somehow and re-run immediately without having to formally check those changes in in order to kick off travis again.
When you are logged in on Travis and you will find a button to rerun a build.
You could try executing your build commands inside a normal Ubuntu VM.
Back in the days box images were available over at http://files.travis-ci.org/boxes/provisioned/travis-ruby.box
But Travis switched from Vagrant to BlueBox and stopped providing the downloads.
You could try on IRC and ask to get access to your “box” for debugging.
I'm not sure if you get access.
I have a GIT repo for an application. The application starts a long running process that I want to keep running in the background.
When I make a change to any of the application config files, commit those changes, and then git-push those changes, everything works fine. The long running process picks up the config changes I've pushed.
Sometimes though, I make a mistake in the commit history and purge those commits with a rebase. I then use git push -f to force the purged changes through. Doing so kills the long running process.
Why would that be?
As I understand it, when I git-push commits, it will only change the lines of code that I have edited.
Am I right in thinking that using git push -f instead changes more than just the lines in the commits I've purged? I suspect the git push -f command is also refreshing (though not changing) other application files in the repo, if not all of them, and that's why the process dies on a rollback attempt...
Does anyone have a definitive answer?
Though I still have my suspicions, I think the issue may have just been caused by a careless commit that overwrites the file that the process is based on.
If I discover anything new (as likely as that might be), then I will update the answer.
Thanks for the help.
Update:
I'm pretty sure that it's not GIT now. It was because the long running process prints out messages to the terminal. When I was testing the GIT hook, I always had an SSH terminal open, so the program ran fine. But when I closed the terminal and made an upstream push from my remote machine, the application had no terminal to print messages to...
Doh.
Accounting for this appears to work.
Our entire code base at work is housed on an IIS Windows environment. My task was to
copy the code to our new Linux Ubuntu server and go through the code to make the changes necessary to get it to run on the Linux box. It took a couple months but it works. In the meantime, code updates were made on the productions Windows server to the code base by another developer. Now I have the task of pushing the changes to the Linux box so we can pull the trigger and run it live in the new environment.
PROBLEM:
When I performed a git push origin master I was thrown an error stating that I must perform a pull first. Upon diverging and running a git status it says I have `11 and 3 commits each, respectively. The problem is over the course of 2 months I can't remember all the changes made and something could come crashing down in the Windows environment and that can't happen even for a short time. I just need some advice.
I was wondering if it's possible to create a clone of origin master then push the changes to my local from the prod, merge the files and then upload to the Linux box since I can't push to the Linux now because of the needed pull.
When you do git pull, the changes in the remote origin branch are merged into your local origin branch. That is your "local clone of origin/master," so to speak. Inspect the state of your own master branch, and if everything looks right, then push your changes.
Run gitk --all before and after the pull, and you will see that the merge took place, but only on your system.