How to update and switch branch with a checkout when using pipenv? - pipenv

I'm using pipenv and have a repository checked out: https://github.com/rvanlaar/django-tinymce4-lite with branch rvanlaar-patch-1.
I want to switch this checkout to master. How can I do that?
I tried changing the Pipfile and running pipenv sync.

Running pipenv install updated the git checkout.

Related

Xcode 11 swift package manager unable resolve packages

I keep on getting the following error when building a project in Xcode 11 which includes a couple of swift packages added via new Xcode interface
Showing All Messages :terminated(1): /Applications/Xcode-beta.app/Contents/Developer/usr/bin/git -C /Users/<xyz>/Library/Developer/Xcode/DerivedData/<xyz>-cqkqfkidemtecxegtugdwffhvvmp/SourcePackages/checkouts/ios-sign-in-with-apple checkout -f 2b61cc97dea9d34f913c22c799476eb8e0a31144 output:
Note: checking out '2b61cc97dea9d34f913c22c799476eb8e0a31144'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 2b61cc9 inicial project
This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.
Linking git-lfs solved the issue
ln /usr/local/bin/git-lfs /Applications/Xcode-beta.app/Contents/Developer/usr/bin/git-lfs
Got the inspiration from here github link

Git problems, 'git not installed'

I have set up my github account, configured it with SSH and now I am trying to retrieve group work from gitlab. I have managed to pull the work so that it is on my machine but when I go to bundle install I encounter an error.
It says that I need to install git in order to gems from git repository.
I've added an image which might help.
Check if Git is installed in a folder with spaces or special character.
Try and unzip a recent Git (like PortableGit-2.3.7.1-dev-preview-64-bit.7z.exe) under C:\Git, and add that to your PATH:
set PATH=C:\Git\cmd;%PATH%
bundle install
The PATH issue was mentioned before in issue 5027 and in "Can't run bundle update on Windows".

Is bower auto-updating itself from github?

From the documentation it is not clear to me how to update the packages by Bower when I increase the version number. By npm you have to run npm publish. Does bower auto-updates the stored packages from github after I registered the package, or how does this work?
Should I add only the browser specific builds to the bower.json and let nodejs ppl install my lib from npm? (currently only nodejs is supported by my lib, but I intend to support browsers with browserify later.)
Bower does automatically keep up with your package updates, as long as you tag your releases and push the tags:
git commit -am "new version"
git tag -a v1.0.1 -m "1.0.1"
git push origin master --tags
More specification in the docs would be nice. This is the best hint that I can find:
Your package must be publically available at a Git endpoint (e.g.,
GitHub). Remember to push your Git tags!

How to clone my existing rails app

I have a rails app that on my local development machine and I want to copy it and have a sort of starting point in case I don't want to start over from scratch later for future projects. Is there a rails command I can use to "clone" it or should I simply copy and paste the directory?
There is no rails command to clone your app. But you can install git on your system and create a git repo to do what you want easily. To do this go to your rails app root and execute
git init
git add .
git commmit -m "Your commit message"
You can then continue working and commit your changes as needed or discard all or individual changes. You can also clone your app with the git clone commmand.

How to update rails plugins installed through git but in a svn repo?

My rails app is in a svn repository, but several of the plugins are installed through git and later added to the svn repo. How can I update these plugins? I can't seem to get script/plugin update to do anything. I'd really like to update activemerchant to get rid of the Inflector warnings.
If you haven't made any local changes to the plugin and you don't need to track what changes to it the update will bring, you can just run script/plugin install again, passing in --force if you need to. For example:
script/plugin install --force git://github.com/dchelimsky/rspec.git
If you already have a static copy of a plugin checked into Subversion, it can be a pain to update it via script/plugin, so here's what I end up doing in order to switch it from a static install to a Git checkout all within one Subversion commit:
git clone git://github.com/foo/bar.git ~/foobar
mv ~/foobar/.git rails_app/vendor/plugins/foobar/.git
rm -rf ~/foobar
cd rails_app/vendor/plugins
git reset --hard
Then make sure to add .git and everything else that has changed to the Subversion project and you will be all up-to-date. You can use other git commands to pull down updates, move to a different branch, etc. Then just check things in again once they are at the state that you want.
One thing I do in this case, I remove the plugin directory then I commit to SVN, this will remove the old plugin in the repo. (I usually moved it in a tmp directory, just in case and delate it later once the new one is working fine)
I then reinstall the new version of the plugin, and commit again.
Easy.
You should just be able to navigate to the plugin's directory and hit:
git pull
. I'm pretty sure that script/install plugin just checks the code out from the git repo.
In order for Git to be able to recognise the repository as a Git repository, you will need to add the .git subdirectory and everything under it to Subversion as well. Otherwise, the plugin will just look like another pile of source code and Git will say it's "Not a Git repository".
Ran into the same situation and used this solution: had paperclip installed as a plugin sitting in an svn repo as part of my app. Now I wanted to use the latest version instead and didnt change a bit of the paperclip plugin so I could easyly remove it from the app/svn and install it as a gem instead. done.

Resources