Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Comments on Is `git pull` dangerous?

Post

Is `git pull` dangerous?

+4
−2

I heard git pull is dangerous.

  • Is it really dangerous?

  • If so, why or how is it dangerous?

  • Are there any flags that mitigate or remove the danger?

  • What are the alternatives if it is dangerous?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Unclear (3 comments)
Unclear
Karl Knechtel‭ wrote 2 months ago

What kind of danger specifically do you have in mind? This is a very different question if it's about supposed security exploits vs. losing work by overwriting your working copy.

alx‭ wrote 2 months ago

Both.

The most common worry is to lose my working copy and having a hard time recovering it (git-reflog(1) usually helps recover those).

However, I'm also worried about a git server being hacked and me pulling from it and blindly incorporating those changes as if they were fine.

I have a git server where I push my working copy often for backup, or for continuing work in a different computer. I usually rebase the changes often after downloading a working branch.

I always sign all of my commits with PGP, so that I can check the integrity of the commits. So I usually git-fetch(1), check the integrity of the signatures with git-log(1), and then rebase as appropriate.

If I do a git-pull(1), especially a rebase one, I'll have a hard time knowing what I pulled, and so it's a bit harder to verify.

matthewsnyder‭ wrote about 2 months ago

The question seems answerable if you assume that the OP is asking for any danger.