I finished all the commands of my new cargo-git. A Git helper to use with #rustlang 's cargo. I should make a video or a demo to show how this workflow works but you could use it for some specific helpers and keep your own workflow https://crates.io/crates/cargo-git …
-
Prikaži ovu nit
-
In brief: 1. You create new branches using: cargo git fork my-new-branch origin/master (You want the parent to be origin/master, not just master) 2. (add changes) 3. You commit with: cargo git commit (This will create a WIP, no need to put a commit message for now)
1 reply 0 proslijeđenih tweetova 3 korisnika označavaju da im se sviđaPrikaži ovu nit -
4. You update your branch with master: cargo update This will try to merge as much as possible without conflict. 5. If there is a conflict, the command will stop like a git merge. You resolve and commit. 6. Run again: cargo git update (Run again until it's up-to-date)
0 proslijeđenih tweetova 1 korisnik označava da mu se sviđaPrikaži ovu nit -
That's my new workflow. It doesn't use rebase at all and it has the advantage to keep the commits in their original order. Of course it is expected that you squash merge at the end and not merge (otherwise you will have a lot of WIP in master)
1 reply 0 proslijeđenih tweetova 0 korisnika označava da im se sviđaPrikaži ovu nit -
The main advantage is also that you solve conflicts commit-per-commit like a rebase but without being in a rebase state. And you solve them from bottom to top. The update command will try to update as much as possible without your intervention.
1 reply 0 proslijeđenih tweetova 0 korisnika označava da im se sviđaPrikaži ovu nit -
Another cool feature: cargo git update --deps This will not touch at your current Git state. Run `cargo update`. And make a commit with just Cargo.lock. Any changes (stages or not) are kept, no need to stash or anything.
1 reply 0 proslijeđenih tweetova 1 korisnik označava da mu se sviđaPrikaži ovu nit -
When you want to visualize your work: cargo git diff This runs the `git diff` command but only on files that are not Cargo.lock. When you want to stage changes: cargo git add Just like git add, but it will ignore Cargo.lock. All the git add options are available (like -p)
1 reply 0 proslijeđenih tweetova 0 korisnika označava da im se sviđaPrikaži ovu nit
Another useful thing: cargo git squash This will soft reset your branch to the parent branch. It's like doing a rebase and squashing everything. This is useful when you want to write the proper commit message before merging.
-
-
cargo git delete <branch> To delete a branch and its remote/upstream branch in one go.
1 reply 0 proslijeđenih tweetova 1 korisnik označava da mu se sviđaPrikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.
Rustacean