But you should be very careful with it, because it points on a commit B, which is published. Strictly speaking, you may do the same trick with your origin/master branch, you may reset it to any other commit. reset it to commit B, where origin/master is pointing to, and you will no longer see this commit in your log, because there is no branch from which it can be reached. In SmartGit to do this, just click down on that green branch label and drag it to any other commit. You can reset this branch to whatever commit you like. You continue to see commit A, because you have a branch pointing on it. In your situation you have to take into account several GIT features: SmartGit is merely a client, though very convenient and fully featured. What you are asking is not specific to SmartGit, but to GIT in general. Is there something else i have to do in order to update all my folders when another user do a commit besides PULL ? Im pretty new to SmartGit and is kinda of confusing everytime im trying to do a clean pull. What i want to do is delete the first two commits from the log and return to the "Cambios Varios" commit (the one with the green arrow that btw appeared when i was trying to check out that commit).Īll this mess was because my coleague made some changes and add a file and then commit his changes, in order to have my files updated i made a pull but my files didn't get updated on my local repository and didnt add the file that was added by my coleague. I have also try to revert the commit that i made by mistake but i still see the commit on the log. I have been trying to checkout the commit that i want to return to but Smartgit ask me to create a local branch in order to do this (screen shot attached) and since im not an expert with SG i really need some advice. Git is the source code version control system that is rapidly becoming the standard for open source projects.By mistake i have made a commit that now i want to delete from the history log and return to a previous commit. It has a powerful distributed model which allows advanced users to do tricky things with branches, and rewriting history. What a pity that it’s so hard to learn, has such an unpleasant command line interface, and treats its users with such utter contempt. The information model is complicated – and you need to know all of it. As a point of reference, consider Subversion: you have files, a working directory, a repository, versions, branches, and tags. That’s pretty much everything you need to know. In fact, branches are tags, and files you already know about, so you really need to learn three new things. Now Git: you have files, a working tree, an index, a local repository, a remote repository, remotes (pointers to remote repositories), commits, treeishes (pointers to commits), branches, a stash… and you need to know all of it. The command line syntax is completely arbitrary and inconsistent. Some “shortcuts” are graced with top level commands: “git pull” is exactly equivalent to “git fetch” followed by “git merge”. But the shortcut for “git branch” combined with “git checkout”? “git checkout -b”. Specifying filenames completely changes the semantics of some commands (“git commit” ignores local, unstaged changes in foo.txt “git commit foo.txt” doesn’t). The various options of “git reset” do completely different things. The most spectacular example of this is the command “git am”, which as far as I can tell, is something Linus hacked up and forced into the main codebase to solve a problem he was having one night. It combines email reading with patch applying, and thus uses a different patch syntax (specifically, one with email headers at the top). The man pages are one almighty “fuck you”. Git-push – Update remote refs along with associated objects They describe the commands from the perspective of a computer scientist, not a user. Git-rebase – Forward-port local commits to the updated upstream head Here’s a description for humans: git-push – Upload changes from your local repository into a remote repository #Change commit message smartgit update# #Change commit message smartgit update#.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |