git-feature | My git workflow | Command Line Interface library
kandi X-RAY | git-feature Summary
kandi X-RAY | git-feature Summary
With all of my projects, I end up following a workflow that looks something like. In git-speak, this roughly translates to. This is fine, but it was starting to see like a lot more typing for something that really a shell script could do. I looked into git-flow and a few other things and decided to do something different. All of the things I do are just shell commands... there's nothing special except the order in which it's done. So I just made a few very handy git aliases that most of the typing for me.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of git-feature
git-feature Key Features
git-feature Examples and Code Snippets
Community Discussions
Trending Discussions on git-feature
QUESTION
When running git commit --fixup=beefca7e
or when referencing a previous commit in a commit message, I have to use the mouse in a clumsy workflow. I use bash:
- Open a new terminal tab/window/pane.
git log --oneline --graph
.¹- Scan through the list to find the relevant commit sha.
- Grab the mouse, select the sha, copy it to the clipboard.²
- Move back the the pane where I was working and paste it there.
This works. But I suspect this can be done much easier.
Are there commandline tools, scripts or git-addons out there that allow me to quickly filter through the commits and copy the sha of a selected entry? Is my workflow wrong(or naive), and did I miss an important git-feature somewhere?
Bonus for being able to use this in vim too, since that is my editor to edit commit messages. Bonus for copying the short sha instead of the full one.
- ¹ I have a somewhat more complex alias for this named
git lg
. - ² xclip/gnome/clipboard manager is configured to auto-copy-on-select. Otherwise ctrl-c/cmd-c or so. Pasting is middle-mouse-button. Saves a few commands but still suboptimal. I'd rather not use the mouse at all and omit most steps.
ANSWER
Answered 2020-Sep-24 at 10:08gitk
/gitg
have "shortcuts" geared for linux : they auto select the sha1 of the selected commit, which places it in the X clipboard, you can the paste the sha with "middle click" without any other action.
On windows, if the sha1 is auto selected, you could just ctrl+C
straight away.
From the command line : you could use one of these tools, combined with an adequate command, to copy a sha1 to the clipboard, but depending on your needs, the "adequate command" may become involved :
QUESTION
If you see the picture below, the blue branch is a feature branch
Dev A and Dev B are working on. No one has branched off of the feature branch. But when Dev B removed some files, committed and pushed the changes to repo, it was created as a branch of the feature branch
in git client graphical view (sourcetree). When Dev B checks git status
, it still says the working branch is the same feature branch
.
Dev A created some service class, committed and pushed it. It shows it still is in the feature branch
. Why does this exactly happen, anyone can help explain please? Is it just graphical? Or either Dev A or Dev B didn't pull a change in between. Additionaly, on next git push
by Dev B, the red new branch merged back to the feature branch.
Upon request, here is the git log
of Dev B:
ANSWER
Answered 2020-Mar-30 at 15:12What happened is Dev A tried to push, but it got rejected, so (s)he pulled and then pushed successfully.
A pull
is equivalent to a fetch
and a merge
. For example, if you are on feature_branch
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install git-feature
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page