Is there a way to view the underlying Git commit that LibGit2Sharp issues? - libgit2sharp

I'm working with LibGit2Sharp, but the performance is so poor as to be worthless. When I execute what I THINK is the equivalent Git command against the repo, it performs just fine...is there any way to see what LibGit2Sharp is doing under the covers to see why it's performing so badly?

Related

Risks of adding a remote git repository to current git svn repository

I'm working in a rails project which uses SVN as central repository, but i'm working (locally) with git-svn, and I want to add a remote where i will only push master for testing purposes (i will push to Heroku).
I've read this from chapter 9.1 of Pro Git (my emphasis):
Don’t rewrite your history and try to push again, and don’t push to a
parallel Git repository to collaborate with fellow Git developers at
the same time. Subversion can have only a single linear history, and
confusing it is very easy. If you’re working with a team, and some are
using SVN and others are using Git, make sure everyone is using the
SVN server to collaborate — doing so will make your life easier.
I won't be collaborating with other Git developers (everyone else is using SVN), but before setting it up, i just want to be sure if there are any associated risks in doing this, and if so, what should/could i do about it.
If it's only for pushing to a repo so that you can then checkout/build/deploy, it won't hurt. That warning you noted is stated there so that you don't start moving around doing crazy things on the repo where you work with git-svn to relate to other developers also using git-svn (plus other restrictions) because of the way that revisions are kept on git-svn.

Capistrano: How can I leave a git repository on live/deployed

Ok, Using capistrano 3.2 with Rails 4.2.
Put simply I want to have each release on the live server to have an intact git repo with it. I know Cap uses git to clone the files but afik it deletes the .git folder by default. I swear I had this working before on earlier versions of Capistrano but no amount of Docs or Googling is finding the right setting. Or if I had an odd version of Cap
And before I get jumped on with "Version control on live? Never make changes to live, develop on your dev server you idiot!?"
Having an active git repo on live is invaluable if something changes out of your control, or if there is an emergency you have no choice but to monkey patch. Because now you have the change shown up by git and you can commit it, and push it back into your central repo and have it go up stream neatly. Its saved my ass before and means I don't have to copy by hand what I know has fixed the "live" issue.
Anyway, justification over. Anyone know how?
I apologies for the simple question, I think it's unlucky google fu which has left me without an answer from searching for this. Searching "Capistrano leave git on live" or other such terms are swamped with using git to deploy.
Cheer in advance.
This would be non-trivial. Capistrano uses git archive piped through tar to create the release folder. Hypothetically, you could override the task which does this, but you would probably spend more effort than it would be worth. I would highly recommend that you look at just creating a workflow where you commit a hotfix and push again. We use a prod branch at which the production deploy points, thus you could commit the change to the prod branch and cap production deploy, then merge your change back down to your development branch.
If you do choose to try and override this, look at the Capistrano source for the git tasks. It uses the Git Strategy class, so you would need to subclass and override it, then override the task to use your class. Capistrano is basically just a subclass of Rake, so look for documentation around overriding a Rake task, e.g. Overriding rails' default rake tasks.
Good luck!

Rails filing system's don't match

When I built my Rails environment my file system in my IDE and on Bitbucket got mitched-matched. How should I fix it?
You might want to try doing a git pull ... as suggested by the error/hint message in your screenshot.
If that fails, then try git pull --rebase to rebase your code onto the HEAD
Also, try git push -f.
Note: A forced push overwrites the structure and sequence of commits on the authoritative repository, throwing away other people's commits. git push -f should be avoided.

Building site on Heroku

I'm beginner on rails, heroku and git, but I've done all installation stuffs.
I created two projects on heroku.com, but I don't know how to change them from my PC (the way I looked from help doesn't work such as "$ git push heroku master").
So, how can I edit one of my herokuapp in different computers?
As I understand, I need git commands to bound my projects on PC to herokuapp, and commands to update projects from heroku to my PC (mostly 2 different Win 7 and sometimes iMac). Am I right? Does anybody can tell me how it's works?
Thank you
If you haven't ever used a version control system before you might be in for a steep learning curve.
Git allows you to manage source revision across distributed repositories. In your case, it might make sense to set up a GitHub account and create a git repository there, then use that as your master repository. You use git to pull code from the master repository to your local machine, where you make your changes. You commit your changes to your local repository and then push these changes to the master repository.
On your heroku account you then git pull from the master repository to retrieve the changes you made.
This brushes over a lot of detail that you need to know. I suggest you start googling git tutorials and read up about how git works and how it's intended to be used.
If you are totally new to git and heroku i would suggest you to go through this

rails distributed parallel tests

How can I run paralell tests on dual core machines connected via SSH on the same network ?
https://github.com/grosser/parallel_tests runs fine for local workers, but there is no way to run it on multiple machines
https://github.com/qxjit/deep-test - I've had no luck upon running it, there is a line in the example like
t.distributed_hosts
which throws an error
With Hydra I got an issue waiting forever for ssh workers
I tried the alpha version of Buffet, created a test repo and ran it but with no luck
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
I want to run only standard unit / integration / functional tests
No fancy stuff at all.
do try out http://test-load-balancer.github.io/ i have had great success with it in the past.
If you are willing to run your tests on a hosted CI service, then there are quite a few good options. To list a few here in no particular order:
Travis CI (there is pro version for private repos)
Semaphore (Heroku addon present) parallelism even on the free plans
Tddium (already mentioned above)
Codeship (Heroku addon present, unsure of any out of the box support)
Circle CI (Parallelism on paid plans)
Snap-CI (Pipeline parallelism allow you greater control but with some configuration. Also they might be adding more out of box support in future)
I have tried all of them in my projects to varying levels, and they all work well. The differences would be mostly in how the services are priced. If you dont mind paying for the subscriptions, it would be best to rely on these services instead of trying to deal with hassle of splitting out the tests into processes. Of course, the exception would be if you doing it at a sufficiently large scale which might justify the cost savings in that case.
Some other points to keep in mind:
Parallelism within the same process can still give you good results on a sufficiently beefy box (with more cores) without much effort should be your first chocie, unless you have have already run out of option.
If your eventual goal is to speed up tests, do look at some benefits Travis-CI offers by with a better file system and an in memory database. (I not sure about this one)
If you still planning on setting up this on your own, you should look at GoCD, in combination with TestLoadBalancer (mentioned earlier).
Keep in mind if the problem your trying to solve is a growing test suite on sufficiently large project, you might want to actively start thinking about splitting your test suites logically and actually speeding them up, since parallelism only manages to delay the ultimate problem of a long running test suite it does not solve it completely.
Although not particularly related to how to run parallel_tests in multiple machine in the network, here are the issues I encountered and how I solved them when using parallel_test.
tests getting killed in the middle of a run using parallel_tests
I think problem in git configuration. check your git configuration
try this link
Whats the best way to work with Github and multiple computers?
You can also use Shippable http://www.shippable.com continuous service for parallel test

Resources