Announcement

Collapse
No announcement yet.

Git 2.45 Released With Initial SHA1/SHA256 Interoperability & Reftable Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • uid313
    replied
    Originally posted by Jaxad0127 View Post

    You don't need fetch and pull. Pull is fetch + merge. Commit and push are separate because your local copy of the repo is a FULL copy, you don't need a remote. And you can push multiple commits at once.

    Git supports having multiple remotes, which is why there are separate commands for "update my understanding of a remote" (fetch) and "give me their changes" (merge, which works works with both local branches and remote ones, specified as remote/branch).

    Git has a default merge strategy, you shouldn't need to specify one. And it auto merges changes, unless it hits a situation where that can't happen. Like if both sides have changed the same line.
    My experience is that I get merge conflicts all and told I have to stash my changes before I can pull even if I changed line 5 and remote has changed line 100.

    Leave a comment:


  • Jaxad0127
    replied
    Originally posted by uid313 View Post

    Distributed is different because in TFVS you just "Get Latest" to get everything from the server to your local workspace but with Git you must do do a fetch and a pull to get it to your local repository and then into your local branch so it is two operations instead of one. In TFVS you just do "Check-in" in one operation but in Git you first have to commit then push so it is two operations.

    So yeah a distributed VCS is a bit a different and a bit more complicated, but I do get how a distributed VCS is different from a VCS and I do grasp the concept of a distributed VCS. I get how Git works offline.

    But TFVS is easier than Git because you don't have to specify any merging strategy and it can auto-resolve merge conflicts for you.
    You don't need fetch and pull. Pull is fetch + merge. Commit and push are separate because your local copy of the repo is a FULL copy, you don't need a remote. And you can push multiple commits at once.

    Git supports having multiple remotes, which is why there are separate commands for "update my understanding of a remote" (fetch) and "give me their changes" (merge, which works works with both local branches and remote ones, specified as remote/branch).

    Git has a default merge strategy, you shouldn't need to specify one. And it auto merges changes, unless it hits a situation where that can't happen. Like if both sides have changed the same line.

    Leave a comment:


  • uid313
    replied
    Originally posted by Weasel View Post
    Distributed simply means you have a local copy of the repo and then you upload/download from the "online" one as you wish. What's harder about local vs online? I don't get it. You know how uploading or downloading with browser works right? Local files vs remote files? Download a copy of a website's html locally?

    git terminology:
    push: upload
    pull/fetch/clone: download
    remote: "online" repo

    Other operations like checkout are done on your local copy of the repo.

    Tip: use firewall and block internet access for git, see what works and what doesn't. You'll be surprised how much stuff works. It's all done locally.

    You should actually be relieved for this, because if you mess up your local repo, it's totally fine, nobody will see it. There's nothing to be embarrassed about, and no apology to string up (assuming you wrecked the online repo in some other VCS).

    You can then just redownload fresh copy with git clone or whatever.
    Distributed is different because in TFVS you just "Get Latest" to get everything from the server to your local workspace but with Git you must do do a fetch and a pull to get it to your local repository and then into your local branch so it is two operations instead of one. In TFVS you just do "Check-in" in one operation but in Git you first have to commit then push so it is two operations.

    So yeah a distributed VCS is a bit a different and a bit more complicated, but I do get how a distributed VCS is different from a VCS and I do grasp the concept of a distributed VCS. I get how Git works offline.

    But TFVS is easier than Git because you don't have to specify any merging strategy and it can auto-resolve merge conflicts for you.

    Leave a comment:


  • Weasel
    replied
    Originally posted by uid313 View Post
    Yes, I do know what a version control software is and what it is used for. I have used Microsoft's Team Foundation Version Control (TFVC) on Azure DevOps. TFVC is a bit different from Git thought because TFVC is a VCS while Git is a DVCS so Git is distributed. TFVS is much easier than Git.
    Distributed simply means you have a local copy of the repo and then you upload/download from the "online" one as you wish. What's harder about local vs online? I don't get it. You know how uploading or downloading with browser works right? Local files vs remote files? Download a copy of a website's html locally?

    git terminology:
    push: upload
    pull/fetch/clone: download
    remote: "online" repo

    Other operations like checkout are done on your local copy of the repo.

    Tip: use firewall and block internet access for git, see what works and what doesn't. You'll be surprised how much stuff works. It's all done locally.

    You should actually be relieved for this, because if you mess up your local repo, it's totally fine, nobody will see it. There's nothing to be embarrassed about, and no apology to string up (assuming you wrecked the online repo in some other VCS).

    You can then just redownload fresh copy with git clone or whatever.
    Last edited by Weasel; 01 May 2024, 12:59 PM.

    Leave a comment:


  • rabcor
    replied
    2024 and still no resume download support

    All these programmers use this thing and it's still a piece of crap.

    Leave a comment:


  • uid313
    replied
    Originally posted by Weasel View Post
    Serious question but, do you even know what a version control system is and what it's used for? I mean how do you expect to understand git, which is a specific VCS, if you don't know what a VCS is in the first place or what you need it for. Instead of git maybe you should learn how VCS works first.

    The only thing I agree on is the git command line which you have to either memorize or write down some common operations you use yourself. Not hard to google though.
    Yes, I do know what a version control software is and what it is used for. I have used Microsoft's Team Foundation Version Control (TFVC) on Azure DevOps. TFVC is a bit different from Git thought because TFVC is a VCS while Git is a DVCS so Git is distributed. TFVS is much easier than Git.

    Leave a comment:


  • Weasel
    replied
    Originally posted by uid313 View Post
    As a person of lesser intelligence who suffers from an intelligence deficiency which hampers my mental abilities and a not-so-proud involuntary member of the mentally challenged community I feel excluded from Git which I perceive as an elitist software designed by the mentally gifted Linux kernel community for the mentally gifted Linux kernel community. For them, by them. The elites, the mentally gifted.

    I am stupid so I edited code in the main branch instead of creating a new branch and now I can't pull or fetch or whatever. I don't even know the difference between pull and fetch so I just do both.

    I try to start the web interface but it wont start and tells me I have to install a web server and configure that. How am I suppose to know how to do that? I don't know how to do that. Just start it, damnit!

    I do a pull or a fetch, I don't know, and I get some error message that I need to pick some merge strategy or something, I don't know, to merge or rebase or something, I have no idea what any of that is, much less the difference.

    I've heard about detached heads, I have no idea what it is, but it sounds terrifying!
    Serious question but, do you even know what a version control system is and what it's used for? I mean how do you expect to understand git, which is a specific VCS, if you don't know what a VCS is in the first place or what you need it for. Instead of git maybe you should learn how VCS works first.

    The only thing I agree on is the git command line which you have to either memorize or write down some common operations you use yourself. Not hard to google though.

    (And for others, I'm fully aware who this guy is since I kept bashing him previously, but here's an attempt at a serious helpful answer...)

    Leave a comment:


  • partcyborg
    replied
    Originally posted by jokeyrhyme View Post

    I do this occasionally, you aren't alone

    My approach to fixing this is, assuming you're still on master/main is:

    1. run `git switch --create my-new-branch-name`
    2. run `git switch master` (or main, whichever you use in your repository)
    3. run `git rebase --interactive origin/master` (or origin/main, as appropriate, assuming your remote is "origin")
    4. in the editor that appears, edit it so that it says "drop" instead of "pick" for any commits that you don't want in master/main, then save and exit

    Now, your commits are still over in the new branch you created in step 1, and they no longer appear in your local copy of master/main
    Please don't feed the troll. He posts the same nonsense copypasta in every single git thread

    Leave a comment:


  • jokeyrhyme
    replied
    Originally posted by uid313 View Post
    ... I edited code in the main branch instead of creating a new branch! ...
    I do this occasionally, you aren't alone

    My approach to fixing this is, assuming you're still on master/main is:

    1. run `git switch --create my-new-branch-name`
    2. run `git switch master` (or main, whichever you use in your repository)
    3. run `git rebase --interactive origin/master` (or origin/main, as appropriate, assuming your remote is "origin")
    4. in the editor that appears, edit it so that it says "drop" instead of "pick" for any commits that you don't want in master/main, then save and exit

    Now, your commits are still over in the new branch you created in step 1, and they no longer appear in your local copy of master/main

    Leave a comment:


  • simsilver
    replied
    Originally posted by uid313 View Post
    I don't even know the difference between pull and fetch so I just do both.

    I try to start the web interface but it wont start and tells me I have to install a web server and configure that. How am I suppose to know how to do that? I don't know how to do that. Just start it, damnit!

    I do a pull or a fetch, I don't know, and I get some error message that I need to pick some merge strategy or something, I don't know, to merge or rebase or something, I have no idea what any of that is, much less the difference.

    I've heard about detached heads, I have no idea what it is, but it sounds terrifying!
    Maybe you could try tortoisehg first, if you have used tortoise-svn. but I feel it‘s less efficient than git for big repos.

    Leave a comment:

Working...
X