To cut the story short, to run a convolutional neural network model, I need an special version of nolearn, which has a url of the form https://github.com/dnouri/nolearn/tree/1659e4811e498dc1f442d8e6486d0831f85255b4/nolearn . However, there are no Download as Zip buttons at the page, nor I can download it with
git clone https://github.com/dnouri/nolearn -branch 1659e4811e498dc1f442d8e6486d0831f85255b4/nolearn
Simply,
git clone https://github.com/dnouri/nolearn/tree/1659e4811e498dc1f442d8e6486d0831f85255b4/nolearn
does not work, too.
Even, I have no idea what should I search for in Google!
Note: This is the last version which provided support for the class Objective, i.e. the command from lasagne.objectives import Objective is no more supported!
This can help you:
How to clone a single branch in git?
Where specifies:
git clone <url> --branch <branch> --single-branch [<folder>]
Docu :
Git Clone
--[no-]single-branch
Clone only the history leading to the tip of a single branch, either specified by the --branch option or the primary
branch remote’s HEAD points at. When creating a shallow clone with the
--depth option, this is the default, unless --no-single-branch is given to fetch the histories near the tips of all branches. Further
fetches into the resulting repository will only update the
remote-tracking branch for the branch this option was used for the
initial cloning. If the HEAD at the remote did not point at any branch
when --single-branch clone was made, no remote-tracking branch is
created.
Other than in Subversion (SVN), git has separate namespaces for directories (file system folders), branches and tags. Thus https://github.com/dnouri/nolearn/tree/1659e4811e498dc1f442d8e6486d0831f85255b4/nolearn is not, per se, a branch. 1659e4811e498dc1f442d8e6486d0831f85255b4 is a commit ID, used here to refer to the revision created by the commit. dnouri/nolearn is the repository name on GitHub (repository nolearn on account dnouri) and the final nolearn in the URL is a directory within the content of revision 1659e4811e498dc1f442d8e6486d0831f85255b4.
The 'normal' way to get this code with git would be:
replicate the repository to your local machine
git clone https://github.com/dnouri/nolearn.git
(You can find this URL on the repository's page https://github.com/dnouri/nolearn, in the 'clone URL' field.)
enter the local repository
cd nolearn
check out the wanted revision
git checkout 1659e4811e498dc1f442d8e6486d0831f85255b4
change into the respective directory inside the repository
cd nolearn
This is the link to the .zip : https://github.com/dnouri/nolearn/archive/1659e4811e498dc1f442d8e6486d0831f85255b4.zip
Related
I have only one commit on master and haven't merged it into the remote. I want to remove my commit, keep my changed files, change my branch, and commit them.
Now I have used git reset --soft HEAD~1, but I am faced with this error:
fatal: ambiguous argument 'HEAD~1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
HEAD~1 is a way to point at "the parent of current commit"
In your situation: the (only) commit on master does not have a parent ...
If your intention is to have this commit on another branch, simply create that other branch:
git checkout -b my/branch
# The above is a shortcut to:
git branch my/branch # Create a new branch `my/branch` on the current commit
git checkout my/branch # Switch to this branch
With one single commit in its history, "removing the commit from master" is the same as "deleting master".
There is no harm in doing it (you can re-create it later): git branch -d master, but you can also live with a local master branch hanging around.
An alternative is to amend the first commit:
# Make your change in the file(s)
git add file_changes
git commit --amend --no-edit
Resource: How can I add a file to the last commit in Git?
If this is from flutter, then the problem is simply from your installation process.
check your .git > refs , if the heads & remote directories are empty, then you simply have incomplete files.
Delete your current flutter folder and download again.
Ensure that 100% of the files are moved/copied during extraction
I never used repo and I've just recently discovered that AOSP is composed of different git repositories.
My question is: how can I checkout between commits?
For example, let's consider this commit
which involves just one .java file (InstallStart.java)
I go to the folder that contains InstallStart.java, in my case:
/mnt/aosp/Android/packages/apps/PackageInstaller/src/com/android/packageinstaller
git log shows that I'm in git repository... but the checkout fails
git checkout 419c6b327562afc9af3bed5e92741e5bf190ec30
fatal: reference is not a tree: 419c6b327562afc9af3bed5e92741e5bf190ec30
I was wondering whether it is possible to clone a subdirectory of a repository off GitHub using Android Studio? Usually when you clone a repository, you go "Check out project from Version Control" --> GitHub --> then you get something like this
However, for example, I would like to clone this subrepository as I would like to build the project and put it in my emulator. This address is https://github.com/hmkcode/Android/tree/master/android-material-design-appcompat.
I have tried to guess https://github.com/hmkcode/Android.git might have becomehttps://github.com/hmkcode/Android/android-material-design-appcompat.git, but this did not work.
Is it possible to clone this subrepository as I dont want the rest of the repository. I dont want to have to clone the whole thing and try to piece together the sub project.
This is not a "subrepo": it is just a subdirectory, and git reasons at the repo level.
You could use sparse checkout though, but it is not supported directly by Android studio. You would have to prepare your local repo:
mkdir hacker-scripts
cd hacker-scripts
git init .
git config core.sparseCheckout true
echo 'android-material-design-appcompat/' > .git/info/sparse-checkout
git remote add -f origin https://...
git pull origin master
I posted this question at Android Enthusiasts but figured it was the wrong place to ask, so I deleted it from there and asking it "again" here.
This is such a noob question, and pardon me if it is, but I just want to understand the underlying concepts clearly. Reading repo help and Google's repo command reference page doesn't really enlighten much. I understood some bits from Google's reference page, but I still need some more clarifications.
Following the instructions on how to download android source, I executed these two commands on an Ubuntu shell: (I've taken cared of all the prerequisites for the environment.)
~/android4.2.2$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.2_r1.2
~/android4.2.2$ repo sync -j4
After waiting half a day for repo to finish downloading, I ended up with 19G of downloaded material in android4.2.2 directory. So what exactly just happened, and why did it reach 19G when Google said I should only be expecting around 8G of source files?
repo is a python wrapper script for git, its Google Source page defines it as
repo - The Multiple Git Repository Tool
repo init command initializes repo in the current directory. That's, it downloads the latest repo source and a manifest.xml file that describes the directory structure of the git repositories, and store all of these in .repo sub-directory in the current directory. In your case, you have used an optional -b argument which is used to select the branch to checkout. By default (i.e., when -b argument is not used), master branch is used.
repo sync updates working tree to the latest revision. That's, it synchronizes local project directories with the remote repositories specified in the manifest file. If a local
project does not yet exist, it will clone a new local directory from the remote repository and set up tracking branches as specified in the manifest. If the local project already exists, it will update the remote branches and rebase any new local changes on top of the new remote changes. -j argument is used to set number of parallel jobs to execute. The default value can be defined in the manifest, and also can be overridden in command line as in your case.
why did it reach 19G when Google said I should only be expecting around 8G of source files?
That should be because besides the source files, you will get all the history of Android since the beginning of the time :)
Hope this helps.
I'm new to git. I want to create a new project with Eclipse, and use Github to manage it.
The problem is, Github suggested me to add a .gitignore file to let it ignore files in bin, but once I did that, there is a new master in the Github's repository.
Then when I tried to push my project, it said:
To git#github.com:Benjaminz/SocialEventPlanner
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git#github.com:Benjaminz/SocialEventPlanner'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
When I ran pull it said:
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master
What mistake did I make? How to correct this?
Thank you. :)
it seems that ur poject is not stashed
Do Below Steps :
git stash
git pull
git stash pop
For the second error message, you can type:
git branch -u origin/master master
Then try again your git pull.