The lower left pane displays the commit details and full diff. Clicking a file in the lower right pane focuses the diff in the lower left pane to the relevant section. Gitk will reflect the current state of the repository. If the repository state is modified through separate command line usage like changing branches Gitk will need to be reloaded. Gitk can be reloaded by on the File menu -> Reload.īy default Gitk will render the current history of commits. Gitk has a variety of command line options that can be passed on initialization. Git checkout -b new_branch & echo "new branch content" > new_branch_file.txt & git add new_branch_file.txt & git commit -m "new branch commit with new file and prepended content" & echo "new branch index update" > index.txt & git commit -am "new branch commit to index.txt with new content" The general form of execution with these revision options is as follows: Options These options primarily restrict the list of commits rendered to Gitk's top-level view. The proceeding command sequence will create a new branch named new_branch and add file new_branch_file.txt to it. Additionally, new content is added to index.txt and an additional commit is made for that update. We now have a new branch that is 2 commits ahead of main. We must reload Gitk to reflect these changes. This is a great learning opportunity to discuss Git's branching mechanism. Gitk displays the commits as a straight line sequence of commits. The term branch implies that we should expect a 'branch' or fork in the timeline. Git branches are different from other version control systems. In Git, a branch is a pointer to a commit. The pointer moves to commits as they are created. When you create a git branch, you are not changing anything in the structure of the repository or the source tree. Executing gitk main.new_branch will open Gitk with only the commits between the two branch refs In order to compare the commits that differ between the 2 branches Gitk needs to be launched with a specified revision range. This is a powerful utility for comparing branches. Git Gui is another Tcl/Tk based graphical user interface to Git. Whereas Gitk focuses on navigating and visualizing the history of a repository, Git Gui focuses on refining individual commits, single file annotation and does not show project history. Git Gui also supplies menu actions to launch Gitk for history exploration. Git Gui is also invoked from the command line by executing git gui. In conclusion, Gitk is a graphical interface wrapper for git log. Gitk is incredibly powerful for visualizing and exploring the history of a repository. Gitk is also a helpful tool for learning the internals of Git.GitX is a simple Chrome extension that allows developers to add private notes/comments to GitHub, only visible to collaborators. With this extension, you can create private notes in GitHub issues and pull requests. The Chrome extension needs permission to access your GitHub account and then you can simply start adding the private notes. The extension basically adds an extra button on issues or PR pages that you can use to pos private messages. This is simple and very nice and all of your contributors don’t have to use a specific medium to communicate. Many times when you are working on a repository on GitHub then you have to discuss things with the contributors. And you generally use Slack, email, or some team communication tool for that.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |