All of lore.kernel.org
 help / color / mirror / Atom feed
* git merge issues
@ 2014-06-12  5:16 Raghavendra
  2014-06-12  5:28 ` Vignesh Radhakrishnan
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Raghavendra @ 2014-06-12  5:16 UTC (permalink / raw)
  To: kernelnewbies

Hello everyone,

Assume that i have two branches in my repository: master and devel.

-- I've updated the master branch from the remote repository (using git 
pull).
    Assume that the file name 'file.txt' has gone through an update.

-- Now the same file has also gone through a modification in the devel 
branch (manual editing)

-- Now when I do a 'git merge master' from my devel branch, I am facing 
a conflict issue something like this :

Auto-merging file.txt
CONFLICT (content): Merge conflict in file.txt
Automatic merge failed; fix conflicts and then commit the result.

Now my question is that do I need to solve the merging issue manually or 
is there any way to solve this using git?

Thank you.
Raghavendra

-------------------------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 14+ messages in thread

* git merge issues
  2014-06-12  5:16 git merge issues Raghavendra
@ 2014-06-12  5:28 ` Vignesh Radhakrishnan
  2014-06-12  5:30 ` Mandeep Sandhu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Vignesh Radhakrishnan @ 2014-06-12  5:28 UTC (permalink / raw)
  To: kernelnewbies

Hi Raghavendra ,

AFAIK , you need to solve it manually and do git commit after this.
This happens when git tries to resolve it but does know how to solve
the same. Git will record the conflict resolution that you have done
and in case the same kind of conflict occurs, it will resolve the
conflict automatically based on your previous resolution.

Thanks,
--Vignesh

On Thu, Jun 12, 2014 at 10:46 AM, Raghavendra <arrao@cdac.in> wrote:
> Hello everyone,
>
> Assume that i have two branches in my repository: master and devel.
>
> -- I've updated the master branch from the remote repository (using git
> pull).
>     Assume that the file name 'file.txt' has gone through an update.
>
> -- Now the same file has also gone through a modification in the devel
> branch (manual editing)
>
> -- Now when I do a 'git merge master' from my devel branch, I am facing
> a conflict issue something like this :
>
> Auto-merging file.txt
> CONFLICT (content): Merge conflict in file.txt
> Automatic merge failed; fix conflicts and then commit the result.
>
> Now my question is that do I need to solve the merging issue manually or
> is there any way to solve this using git?
>
> Thank you.
> Raghavendra
>
> -------------------------------------------------------------------------------------------------------------------------------
> [ C-DAC is on Social-Media too. Kindly follow us at:
> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>
> This e-mail is for the sole use of the intended recipient(s) and may
> contain confidential and privileged information. If you are not the
> intended recipient, please contact the sender by reply e-mail and destroy
> all copies and the original message. Any unauthorized review, use,
> disclosure, dissemination, forwarding, printing or copying of this email
> is strictly prohibited and appropriate legal action will be taken.
> -------------------------------------------------------------------------------------------------------------------------------
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
http://vigneshradhakrishnan.blogspot.com/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* git merge issues
  2014-06-12  5:16 git merge issues Raghavendra
  2014-06-12  5:28 ` Vignesh Radhakrishnan
@ 2014-06-12  5:30 ` Mandeep Sandhu
  2014-06-12  5:53 ` Andreas Platschek
  2014-06-12  6:32 ` git download jinzhao at wingtech.com
  3 siblings, 0 replies; 14+ messages in thread
From: Mandeep Sandhu @ 2014-06-12  5:30 UTC (permalink / raw)
  To: kernelnewbies

> Now my question is that do I need to solve the merging issue manually or
> is there any way to solve this using git?

This is in no way related to the Linux kernel. You should be asking
this on the git mailing list.

Short answer - you will have to manually fix the conflict. Git could
not do it automatically and hence it's asking you to fix it. After
fixing the conflict, do 'git add <file>' and then 'git commit'.

HTH,
-mandeep


>
> Thank you.
> Raghavendra
>
> -------------------------------------------------------------------------------------------------------------------------------
> [ C-DAC is on Social-Media too. Kindly follow us at:
> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>
> This e-mail is for the sole use of the intended recipient(s) and may
> contain confidential and privileged information. If you are not the
> intended recipient, please contact the sender by reply e-mail and destroy
> all copies and the original message. Any unauthorized review, use,
> disclosure, dissemination, forwarding, printing or copying of this email
> is strictly prohibited and appropriate legal action will be taken.
> -------------------------------------------------------------------------------------------------------------------------------
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 14+ messages in thread

* git merge issues
  2014-06-12  5:16 git merge issues Raghavendra
  2014-06-12  5:28 ` Vignesh Radhakrishnan
  2014-06-12  5:30 ` Mandeep Sandhu
@ 2014-06-12  5:53 ` Andreas Platschek
  2014-06-12  6:32 ` git download jinzhao at wingtech.com
  3 siblings, 0 replies; 14+ messages in thread
From: Andreas Platschek @ 2014-06-12  5:53 UTC (permalink / raw)
  To: kernelnewbies


http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging#Basic-Merge-Conflicts

andi

On 06/12/2014 07:16 AM, Raghavendra wrote:
> Hello everyone,
>
> Assume that i have two branches in my repository: master and devel.
>
> -- I've updated the master branch from the remote repository (using git 
> pull).
>     Assume that the file name 'file.txt' has gone through an update.
>
> -- Now the same file has also gone through a modification in the devel 
> branch (manual editing)
>
> -- Now when I do a 'git merge master' from my devel branch, I am facing 
> a conflict issue something like this :
>
> Auto-merging file.txt
> CONFLICT (content): Merge conflict in file.txt
> Automatic merge failed; fix conflicts and then commit the result.
>
> Now my question is that do I need to solve the merging issue manually or 
> is there any way to solve this using git?
>
> Thank you.
> Raghavendra
>
> -------------------------------------------------------------------------------------------------------------------------------
> [ C-DAC is on Social-Media too. Kindly follow us at:
> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>
> This e-mail is for the sole use of the intended recipient(s) and may
> contain confidential and privileged information. If you are not the
> intended recipient, please contact the sender by reply e-mail and destroy
> all copies and the original message. Any unauthorized review, use,
> disclosure, dissemination, forwarding, printing or copying of this email
> is strictly prohibited and appropriate legal action will be taken.
> -------------------------------------------------------------------------------------------------------------------------------
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 14+ messages in thread

* git download
  2014-06-12  5:16 git merge issues Raghavendra
                   ` (2 preceding siblings ...)
  2014-06-12  5:53 ` Andreas Platschek
@ 2014-06-12  6:32 ` jinzhao at wingtech.com
  2014-06-12  6:44   ` 回复: " jinzhao at wingtech.com
  2014-06-12 13:18   ` Valdis.Kletnieks at vt.edu
  3 siblings, 2 replies; 14+ messages in thread
From: jinzhao at wingtech.com @ 2014-06-12  6:32 UTC (permalink / raw)
  To: kernelnewbies

Hi,
Now we install git on servers, when we use "git clone" to download the code, the rate is too slow, how to speed the rate?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140612/5bfc801e/attachment-0001.html 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* 回复: git download
  2014-06-12  6:32 ` git download jinzhao at wingtech.com
@ 2014-06-12  6:44   ` jinzhao at wingtech.com
  2014-06-12 16:26     ` ?ظ?: " Valdis.Kletnieks at vt.edu
  2014-06-12 13:18   ` Valdis.Kletnieks at vt.edu
  1 sibling, 1 reply; 14+ messages in thread
From: jinzhao at wingtech.com @ 2014-06-12  6:44 UTC (permalink / raw)
  To: kernelnewbies

And use "top" command, show the memory has used 90%+, but the CPU just 1%+.  
 



jinzhao at wingtech.com

???? jinzhao at wingtech.com
????? 2014-06-12 14:32
???? kernelnewbies
??? git download
Hi,
Now we install git on servers, when we use "git clone" to download the code, the rate is too slow, how to speed the rate?
Thanks!


__________ Information from ESET NOD32 Antivirus, version of virus signature database 9932 (20140612) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140612/1eb97a31/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 27161 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140612/1eb97a31/attachment-0001.jpe 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* git download
  2014-06-12  6:32 ` git download jinzhao at wingtech.com
  2014-06-12  6:44   ` 回复: " jinzhao at wingtech.com
@ 2014-06-12 13:18   ` Valdis.Kletnieks at vt.edu
  1 sibling, 0 replies; 14+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2014-06-12 13:18 UTC (permalink / raw)
  To: kernelnewbies

On Thu, 12 Jun 2014 14:32:26 +0800, "jinzhao at wingtech.com" said:
> Now we install git on servers, when we use "git clone" to download the code,
> the rate is too slow, how to speed the rate?

a) You can just start it Friday as you leave the office, and it should be
done by the time you get in on Monday.

b) Remember that if you want it on multiple machines, you can clone it to one
box, and then use that as the source of a clone to other boxes....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140612/881b6627/attachment.bin 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* ?ظ?: git download
  2014-06-12  6:44   ` 回复: " jinzhao at wingtech.com
@ 2014-06-12 16:26     ` Valdis.Kletnieks at vt.edu
  0 siblings, 0 replies; 14+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2014-06-12 16:26 UTC (permalink / raw)
  To: kernelnewbies

On Thu, 12 Jun 2014 14:44:35 +0800, "jinzhao at wingtech.com" said:
> And use "top" command, show the memory has used 90%+, but the CPU just 1%+.

This is not indication of a problem - Linux will intentionally try to keep
potentially useful data cached in memory, so you should *normally* see
memory 90-95% full..

Oh, and your swapspace is probably *way* too big - 8G of RAM and 24G of swap
is just asking for trouble.  1G or 2G of swap is very useful to prevent
an OOM if you get close to your RAM limit.  But if you're dug much deeper
into swap, you're probably thrashing so hard that you'll actually wish
that you *did* OOM something and get control of your system back....

(And yes, there's times when 8G of RAM and 24G of swap makes sense.  That's
like 0.1% of the time, and if you're the admin of such a system, you
probably aren't the type that will ask questions on kernelnewbies. ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140612/5bbe8428/attachment.bin 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: git download
  2022-11-23 17:17 git download Vasilij Demyanov
  2022-11-23 19:14 ` Jacob Keller
  2022-11-24 16:52 ` Sean Allred
@ 2022-11-25  6:06 ` ZheNing Hu
  2 siblings, 0 replies; 14+ messages in thread
From: ZheNing Hu @ 2022-11-25  6:06 UTC (permalink / raw)
  To: Vasilij Demyanov; +Cc: git

Hi,

Vasilij Demyanov <qvasic@gmail.com> 于2022年11月24日周四 01:27写道:
>
> Hello everybody!
>
> I have a need to get just one file from a repository, it would be
> useful to have a command something like this:
>
> git download repo_url branch_or_commit path/to/file
>
> Or maybe there is something like this, I just haven't found it in the docs?
>

If the git server support partial-clone (uploadpack.allowFilter),
maybe you can use this way:

    git clone --depth=1 --single-branch --branch=main --no-checkout
--filter=blob:none
git@github.com:derrickstolee/sparse-checkout-example.git
    cd sparse-checkout-example
    git sparse-checkout set --no-cone "/README.md"
    git checkout main

it will only download single commit, multiple tree, and one blob.

If the server supports fetch any objects
(uploadpack.allowAnySHA1InWant) and you already know the
file's SHA1, there is a kind of black magic here:

    git init repo
    cd repo
    git remote add origin <repo>
    git -c fetch.negotiationAlgorithm=noop fetch force --no-tags
--no-write-fetch-head --filter=blob:none --stdin
    <blob-oid>

You will get only one blob, "git cat-file -p <blob-oid>" to view the
contents of this file.

Note these two performance maybe not better than git archive or some
file pages support by git server
directly such as
https://raw.githubusercontent.com/derrickstolee/sparse-checkout-example/main/README.md

> Best regards,
> Vasyl

--
ZheNing Hu

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: git download
  2022-11-23 17:17 git download Vasilij Demyanov
  2022-11-23 19:14 ` Jacob Keller
@ 2022-11-24 16:52 ` Sean Allred
  2022-11-25  6:06 ` ZheNing Hu
  2 siblings, 0 replies; 14+ messages in thread
From: Sean Allred @ 2022-11-24 16:52 UTC (permalink / raw)
  To: Vasilij Demyanov; +Cc: git


Vasilij Demyanov <qvasic@gmail.com> writes:

> I have a need to get just one file from a repository, it would be
> useful to have a command something like this:
>
> git download repo_url branch_or_commit path/to/file

My immediate thought was git-archive[1], but depending the specifics of
your needs/setup, you could use curl/wget for this pretty simply. For
example, if you're using GitHub, you can

    curl https://raw.githubusercontent.com/git/git/master/README.md

to dump the content of the README to standard out. As another example,
to get the content of next:builtin/var.c,

    curl https://raw.githubusercontent.com/git/git/next/builtin/var.c

The general pattern:

    https://raw.githubusercontent.com/<repo>/<branch-or-commit>/<file-path>

GitLab's pattern is similar:

    https://gitlab.com/<repo>/-/raw/<branch-or-commit>/<file-path>

e.g.

    curl https://gitlab.com/gitlab-org/git/-/raw/main/README.md

This will be limited to getting a single file at a time. If you want
more, you can make more curl requests, but git-archive can give a whole
directory or even the entire repo at a specific commit. Since
git-archive outputs a tar/zip file, you'll want to combine it with your
favorite decompression tool to get your content.

[1]: https://git-scm.com/docs/git-archive

--
Sean Allred

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: git download
  2022-11-23 17:17 git download Vasilij Demyanov
@ 2022-11-23 19:14 ` Jacob Keller
  2022-11-24 16:52 ` Sean Allred
  2022-11-25  6:06 ` ZheNing Hu
  2 siblings, 0 replies; 14+ messages in thread
From: Jacob Keller @ 2022-11-23 19:14 UTC (permalink / raw)
  To: Vasilij Demyanov; +Cc: git

On Wed, Nov 23, 2022 at 9:27 AM Vasilij Demyanov <qvasic@gmail.com> wrote:
>
> Hello everybody!
>

Hi,

> I have a need to get just one file from a repository, it would be
> useful to have a command something like this:
>

Ok.

> git download repo_url branch_or_commit path/to/file
>
> Or maybe there is something like this, I just haven't found it in the docs?
>

So this isn't something git itself provides. Various web hosting
services for git provide such access, because they allow viewing the
repository contents. Git can't provide this easily because of the
nature of the commits and trees used to store the contents of the
repository. In order to verify that you got the correct contents, you
essentially have to fetch the commit and all its parents. You can
maybe save some download space by using a sparse clone.. but most
remote repositories may not allow arbitrary commit hash fetching.

If you already have a repository available from some computer/system
you can extract the file at a given version via something like git
cat-file:

$ git cat-file -p <commitish>:<path>

where commitish can be a branch or a commit hash, or other way to
reference a commit, and path is the path of the file.

Unfortunately you will essentially need to have cloned the repository first.

If your project is hosted somewhere using software like github,
gitlab, etc, or has gitweb-like software operating on it, you may be
able to find an API or web interface that lets you extract the
individual file without downloading the repository. This is somewhat
outside the scope of this mailing list tho.

Thanks,
Jake

> Best regards,
> Vasyl

^ permalink raw reply	[flat|nested] 14+ messages in thread

* git download
@ 2022-11-23 17:17 Vasilij Demyanov
  2022-11-23 19:14 ` Jacob Keller
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Vasilij Demyanov @ 2022-11-23 17:17 UTC (permalink / raw)
  To: git

Hello everybody!

I have a need to get just one file from a repository, it would be
useful to have a command something like this:

git download repo_url branch_or_commit path/to/file

Or maybe there is something like this, I just haven't found it in the docs?

Best regards,
Vasyl

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Git download
  2017-03-05 20:26 Git download Cory Kilpatrick
@ 2017-03-06  5:33 ` Torsten Bögershausen
  0 siblings, 0 replies; 14+ messages in thread
From: Torsten Bögershausen @ 2017-03-06  5:33 UTC (permalink / raw)
  To: Cory Kilpatrick, git

On 03/05/2017 09:26 PM, Cory Kilpatrick wrote:
> I have downloaded Git and cannot find the application on my Mac. Should I try to download it again?

I don't think so.

It could be helpful if we can get some more information:

- Could you open the terminal application and type

  which git

git --version

and post the results here ?
It may be worth to mention that Git is a command line tool, so that you 
may not

see anything in the "Applications" folder.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Git download
@ 2017-03-05 20:26 Cory Kilpatrick
  2017-03-06  5:33 ` Torsten Bögershausen
  0 siblings, 1 reply; 14+ messages in thread
From: Cory Kilpatrick @ 2017-03-05 20:26 UTC (permalink / raw)
  To: git

I have downloaded Git and cannot find the application on my Mac. Should I try to download it again? 

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-11-25  6:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-12  5:16 git merge issues Raghavendra
2014-06-12  5:28 ` Vignesh Radhakrishnan
2014-06-12  5:30 ` Mandeep Sandhu
2014-06-12  5:53 ` Andreas Platschek
2014-06-12  6:32 ` git download jinzhao at wingtech.com
2014-06-12  6:44   ` 回复: " jinzhao at wingtech.com
2014-06-12 16:26     ` ?ظ?: " Valdis.Kletnieks at vt.edu
2014-06-12 13:18   ` Valdis.Kletnieks at vt.edu
2017-03-05 20:26 Git download Cory Kilpatrick
2017-03-06  5:33 ` Torsten Bögershausen
2022-11-23 17:17 git download Vasilij Demyanov
2022-11-23 19:14 ` Jacob Keller
2022-11-24 16:52 ` Sean Allred
2022-11-25  6:06 ` ZheNing Hu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.