If I would like to upgrade my kernel from 3.10.80 to 3.16.1 by kernel source patching, what is the best way to do it? I hope I would not need to patch each version one by one..
If you are using mainline kernel tree (i.e. origin is set to git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git) then you can do the following.
If not, then first clone the kernel with,
$ git clone
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Now you can switch to desired kernel version by means of tag, and if you require the patches between the two versions, go ahead.
Diff the changes between v3.10.80 and v3.16.1 with below method
$ git checkout -b v3.16.1 v3.16.1
$ git checkout -b v3.10.80 v3.10.80
$ git branch
master
* v3.10.80
v3.16.1
Now you are on v3.10.80, the following command will create patch of each commit between both the versions.
$ git format-patch v3.16.1
If you want to make a single patch,
$ git diff v3.10.80 v3.16.1 -- > v3.10.80_to_v3.16.1.diff
Related
I am trying to clone this repository:
https://github.com/electronicarts/EASTL
But almost all of the submodules are adding this repository as a submodule! (see: https://github.com/electronicarts/EASTL/tree/master/test/packages)
This creates an infinite recursion, and it keeps cloning forever.
Is there a solution for this?!
The infinite recursion happens if you specify the --recurse-submodules option to git clone. As a workaround, you could:
Clone the repository without submodules:
$ git clone git#github.com:electronicarts/EASTL.git
$ cd EASTL
And then initialize and update the submodules without recursion:
$ git submodule update --init
I want to write a shell program to check whether all go module dependencies in my project are on newest master version in their repositories. In particular, I want to know which branch each module is on. There is a file "go.mod" containing each dependency listed as {module}-{commit time}-{commit ID}. How can I get their git-branch name from SHA-1(commit id) or other message by shell program.
I have tried go list -m -u all, only showing the newest edition if the dependency is not up-to-date. etc. git.xxx.com/project v0.0.0-20191119034146-e894bf51bdcd [v0.0.0-20200609070643-fd412b12b811]. Without cloning the repos, can go module tools resolve this quetion?
I couldn't figure out how to find which branch the current dependency belongs to using only go tools. But there is a way to find which branch the commit is on using git.
git clone <repo-url> && cd <repo> && git branch -a --contains <commit>
Reference: Finding what branch a Git commit came from
How do we add application version in go modules(NOT Dependency version)?I would like to hear from other people on this.I am not sure how to do this
Please follow this guide from the official golang blog for more details.
Let's say you're happy with the API of your module and you want to release v1 as the first stable version. To do this you need to commit latest changes and tag them:
$ git add .
$ git commit -m "feat: changes for v1.0.0"
$ git tag -a v1.0.0 -m 'some release message v1.0.0'
$ git push origin v1.0.0
I want to install mongoDB-driver. When I type this command
go get go.mongodb.org/mongo-driver/mongo
I got :
# cd /Users/jiangwei/go/src/go.mongodb.org/mongo-driver; git pull --ff-only
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
package go.mongodb.org/mongo-driver/mongo: exit status 1
Probably because you've already checked out that repo into your Go path, and have changed to a non-default branch. The simplest way to correct it would be to remove that repo, and start from scratch.
rm -rf $(go env GOPATH)/src/go.mongodb.org/mongo-driver
Of course, this will lose any changes you've made in that repo.
I want to merge the develop branch into the master branch and I thougt I do something like this:
git checkout master
git merge --no-ff develop
git tag -a 1.0.0
but on checkout I get
git checkout master
error: The following untracked working tree files would be overwritten by checkout:
Project/Resources/someimage.png
Please move or remove them before you can switch branches.
Aborting
But I have a file someImage.png in my develop branch and it seems that git has somehow an old file. Is GIT case-sensitive? On the local folder there is no such file.
Shoud I simply use git rm -f filename?
Edit:
Now I tried to delete the file, but I get
fatal: pathspec './Project/Resources/someimage.png' did not match any files
Now I'll try to checkout the master branch with -f.
I forced the checkout like this
git checkout master -f
and the local differences should be ignored. I think through deleting and re-inserting the image there was a problem in the index or so.