Git فيه أوامر مخفية كثيرة يمكنها أن توفر عليك ساعات من العمل. نستعرض 15 أمراً متقدماً مع أمثلة عملية.
Interactive Add
Terminal
# Add specific lines from a file (not the whole file)
$ git add -p
$ git add -p
# Stash with a message
$ git stash push -m “work in progress”
# Find who wrote a specific line
$ git blame -L 42,42 file.ts
# Revert a single commit without undoing others
$ git revert abc123
# Clean untracked files and directories
$ git clean -fd
# See a pretty log graph
$ git log –oneline –graph –all
# Find which commit introduced a bug
$ git bisect start
$ git bisect bad
$ git bisect good v1.0
0 تعليق