---
title: "استخدام ميزة الأسماء المستعارة (aliases) في Git"
description: "يتيح لكم Git إنشاء أسماء مستعارة داخليًا عبر ملف الإعدادات. ويُفترض أن يكون ملف الإعدادات العام في ~/.gitconfig"
canonical: https://oozou.com/til/using-git-s-aliases-feature-61
locale: ar
date: 2020-10-13
topic: shell
---

# استخدام ميزة الأسماء المستعارة (aliases) في Git

> يتيح لكم Git إنشاء أسماء مستعارة داخليًا عبر ملف الإعدادات. ويُفترض أن يكون ملف الإعدادات العام في ~/.gitconfig

Published: 2020-10-13 · Topic: [shell](https://oozou.com/ar/til-topics/shell) ([markdown](https://oozou.com/ar/til-topics/shell.md))

يتيح لكم Git إنشاء أسماء مستعارة داخليًا عبر ملف الإعدادات. ويُفترض أن يكون ملف الإعدادات العام في *~/.gitconfig*

```git
[alias]
  aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort
  count = shortlog -sn
  l = log
  co = checkout
  ca = commit -C HEAD --amend
  c  = commit
  cm = commit -m
  a  = add
  s  = status
  b  = branch
  p  = push
  mt = mergetool
  dt = difftool
  o  = origin
  rc = rebase --continue
  rs = rebase --skip
  pd  = !git checkout develop && git pull origin develop && git branch --merged | grep -v '*' | grep -v 'master' | xargs git branch -d && git fetch --prune origin
  pm  = !git checkout master && git pull origin master && git branch --merged | grep -v '*' | grep -v 'develop' | xargs git branch -d && git fetch --prune origin
  pr = pull-request -c -m
```

معظمها واضح بذاته...

*git pd* (prune develop): ينتقل إلى develop، ويجلب أحدث التغييرات، ويحذف جميع الـ branches القديمة باستثناء develop (سيحذف master أيضًا)

*git pm* (prune master): يقوم بما يقوم به prune develop، لكن مع master

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/ar/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
